Wash the green beans thoroughly. Drain them in a colander and set aside.
Heat half the olive oil in a large skillet over medium heat. Add the chopped onions and sauté until transculent and tender. Stir in the garlic, the grated tomatoes, and potatoes the rest of the olive oil and a pinch of sugar and bring to the boil. The traditional recipe for Greek green beans calls for fresh ripe tomatoes, but if you like you can substitute with canned chopped tomatoes, or Passata tomato juice.
Add the green beans and blend well, so that the green beans are coated with the olive oil and the tomatoes. Turn the heat down, cover with the lid and simmer for around 30 minutes, until the beans are soft and most the juices have evaporated. During cooking, check out if the pan appears to be getting dry and add a little bit hot water if needed.
Towards the end of cooking time season with salt and pepper and stir in the chopped parsley.