Gatsby site can't locate email templates

Hey everyone, I’m having problems getting my gatsby site @, site name: builtbettertechnology, to send custom email templates.

I’ve tried multiple file sources but have had no luck. The templates are located in /src/email_templates/ of my site, I have a feeling the problem is that gatsby is not building the pages necessary for Netlify to find them but I’m not sure how to get around this.

One thing I keep coming back to is creating the templates as a JS file and having gatsby build the page but then I am working with JSX and unable to format the GO syntax to access the variables needed in the email.

Any insight would be greatly appreciated!

All the best,

Hi, I just saw your other post in another topic and suggested you make a separate topic. Which you already did. :+1: Please disregard my response there.

That said, I think the most straightforward way to accomplish what you need is to just use plain html files that you put in the public folder. Is there anything in Gatsby that you rely on for your email templates?

Hi Dennis,

I have the same issue where the default email templates are being used despite setting a custom path of /public/email-templates/confirmation.html in the Netlify dashboard.

Here is the site in question:

The codebase is private, but the custom template is at /static/email-templates/confirmation.html which gets output to the public folder.

Hello @cmperez, welcome to the community!

Just to note, since you indicate that the ‘public’ folder is your publish directory, you shouldn’t include it in the path. So your paths should look like:


Let me know how it goes once you set the paths.

Hi Dennis, I appreciate the reply. Unfortunately I had to switch approaches due to time constraints (using Sendgrid now), but will keep this in mind next time around.