To prepare macarons, line two large baking sheets with parchment paper. Put a master template under the parchment paper or draw about 12 1 1/2-inch circles in rows on the paper, about 1 inch apart.
Process powdered sugar, almond flour and espresso powder in a food processor until finely ground. Sift the mixture through a sieve. If there are more than 2 tablespoons of large chunks left in the sieve, grind them and sift again. Set the mixture aside.
In the bowl of a stand mixer fitted with a whisk attachment, beat egg whites at medium speed until frothy. Reduce the speed to low and gradually add the granulated sugar, 1 tablespoon at a time. Add vanilla. Increase the speed to high and beat until very stiff peaks form, about 5 minutes.
Sift the almond flour mixture over the egg whites. Using a rubber spatula, gently fold the almond flour mixture into the egg whites until the ingredients are just combined. Continue to fold the mixture until it has loosened and falls in a ribbon from the spatula.
Fit a pastry bag with a 1/2-inch round tip and fill the bag with the batter. Using the template as a guide, pipe circles onto the parchment papers.
room temperature for at least 30 minutes. This allows the cookies to develop their crusts.
Preheat oven to 300F. Bake the macarons for 10 to 12 minutes, until set but not browned.
Transfer the baking sheets to wire racks and let the macarons to cool completely on the pans. Once cooled, gently lift half of the cookies from the parchment paper and turn them upside down.
To prepare buttercream, beat butter on high until fluffy. Add powdered sugar and espresso powder and beat until incorporated. Add milk, continue beating for another 3 minutes.
Spoon or pipe a teaspoon of buttercream onto each of the upside-down cookies. Top with the remaining cookies.
Cover and refrigerate. Bring to room temperature before serving.