Preheat oven to 350° and lightly spray a cupcake pan and place a liner in each cup.
In a stand mixer bowl, sift together flour, xantham gum, baking soda, baking powder, cocoa powder and whisk in sugar. Form a well in the middle.
In a measuring cup, add buttermilk, oil, and vanilla. Whisk together and pour into the well of the dry ingredients.
With the paddle attachment, mix everything together on low. Add in coffee and mix for 2 minutes on medium.
Fill cupcake liners about ⅔ full with batter and bake for 15-19 minutes or until a toothpick comes out clean.
Allow cupcakes to cool completely before frosting.