Create Ghost email format via API

I’m trying to create emails based on Ghost posts, but not send them via Mailgun, so I want the email format, as produced by the Ghost renderer from posts. I can’t see how this is possible to do via API endpoints, so is the only way via installing various npm packages locally and rendering it the proper format locally from the post HTML/lexical via a custom node script?

Have you looked into selfhosting n8n?
They have SMTP Nodes available where you just put connection details in and you’re done. You can set a webhook or RSS event from Ghost to then output in an email to distribute to a list. You can even pull user information from Ghost webhooks.

Other solution is using Zapier but that can get costly in comparison to running your own n8n instance.

Ghost doesn’t save or expose the HTML for the emails anywhere, no. If the only use case is avoid sending via Mailgun you could look into some proxies that are floating around. For example:

It’s specific to SES, but could be a good starting point to customise this.

Since it seems like OP wants the Ghost email format, that won’t achieve that goal though. If the format is irrelevant that’s an option, of course.

2 Likes