Peel and cook the potatoes until fork-tender. Drain and put back in the pot. Put the pot back on the burner and cook the drained potatoes for about a minute over medium heat to let the excess moisture evaporate. Take the pot off the heat.
Mash the potatoes (while still hot). The best tool for mashing potatoes is a potato ricer but you can also use a regular potato masher. Do not mash them for too long.
Let the potatoes cool (they can be cold or just slightly warm).
Add lightly beaten egg, salt, and flour to the potatoes.
Knead the dough until it comes together but do not overwork it (I usually start mixing the ingredients with a wooden spoon and then knead it with my hands). You can add more flour if the dough does not come together and is sticky. The amount of flour specified in the recipe is an estimate - the amount of the flour needed may be different depending on the potatoes and the flour type/brand. The dough should be soft but not sticky, it should hold together.
Place the dough on a lightly floured surface and divide into 4 parts. Roll each part into 1,5-2 inch (4-5cm) thick logs. You can dust the dough and your hands lightly with flour. Cut at an angle into 2-inch (5 cm) dumplings.
Cook the dumplings in batches (about 10 dumplings per batch) in a large pot filled with salted water, about 2-3 minutes, counting from the moment when the dumplings float to the surface of the water. The cooking time may be different depending on the size of the dumplings - you can cook test one dumpling and cut it in half to see if there is raw batter in the middle.
Remove from the pot with a slotted spoon.