Let's start by preparing the filling.
Wash and chop spinach leaves. Slice the onion finely, and set aside.
In a high-sided skillet, with a tablespoon of olive oil, brown the onion.
When the onion is golden brown add the spinach, salt a little only because we are going to use the feta for the filling.
Let the spinach wilt and when it is cooked, place it in a bowl and let it cool.
Meanwhile, cut the mozzarella and feta into cubes.
When the spinach has cooled, add it to the cheese and mix everything together.
Preheat the oven to 200° C (400 F).
Roll out the puff pastry on a flat surface, and divide the puff pastry into 8 squares.
Use a fork to pierce the puff pastry.
Fill each square of puff pastry, about one teaspoon of filling, only in one half of the puff pastry.
Fold the puff pastry forming triangles, to close tightly by pressing the edge with a fork to seal.
In a small bowl beat the egg, add a pinch of salt and pepper.
Brush the surface of the puff pastry with the egg and bake in a preheated oven at 200° C for 20 minutes. If necessary, extend the cooking time by a few minutes until the dough is uniformly golden and puffy.
The pie is ready!