Self-hosted newsletter engine with n8n and Gemini (no Mailchimp)
Two n8n workflows: one handles signups with double opt-in (Supabase stores subscribers, Resend sends the confirmation email); a weekly one fetches the blog's RSS, has Gemini write an intro and three tips, and sends a personalized HTML email to each confirmed subscriber.
Setup steps
- Create a subscribers table in Supabase with a token per subscriber
- Signup webhook in n8n: save as pending with a fresh token, send the confirmation email with Resend
- Confirm webhook checks the token and marks the subscriber confirmed
- Weekly: fetch your RSS feed and ask Gemini for a strict-JSON intro and tips
- Sanitize the AI text, build each email with an unsubscribe link, send through Resend
Steps summarized from the original Blog source ↗. Use “Copy” to grab them with the tools and source link, or copy an AI prompt.
How it went
The author built their blog's newsletter this way instead of signing up for Mailchimp or Substack, and calls the result a reliable, secure newsletter engine.
Worth knowing
Catches they hit: n8n webhooks need CORS headers for signups from a website; re-subscribers kept a stale token until the workflow generated a fresh one; AI text must be sanitized before it goes into HTML email. Resend's free tier allows 10 requests a second and 3,000 emails a month.
Only what the original source ↗ says, re-read Oct 17, 2026. How we write these
Try it with AI
Paste this into ChatGPT, Claude or your own agent for step-by-step help. Prompt written by AppToBot from this recipe's data, not by the original author. It keeps drafts for your review and asks before anything is sent or paid.
Help me set up this automation using n8n + Gemini API + Supabase + Resend: "Self-hosted newsletter engine with n8n and Gemini (no Mailchimp)". Goal: replace Mailchimp/Substack newsletter. How it should work: - Trigger: Every Wednesday (signups handled in real time) - Then: Fetches the latest posts from RSS - Then: Gemini writes an intro and 3 tips - Then: Builds a personalized email per subscriber - Result: Weekly newsletter sent through Resend Setup steps (summarized from the original source): 1. Create a subscribers table in Supabase with a token per subscriber 2. Signup webhook in n8n: save as pending with a fresh token, send the confirmation email with Resend 3. Confirm webhook checks the token and marks the subscriber confirmed 4. Weekly: fetch your RSS feed and ask Gemini for a strict-JSON intro and tips 5. Sanitize the AI text, build each email with an unsubscribe link, send through Resend Guide me one step at a time. Ask me for anything you need (accounts, sheet or channel names) before you start. Safety rules: - Build and test with sample data first, and show me a sample result before anything goes live. - Keep anything that goes to other people (emails, posts, replies, record updates) as drafts for my review until I say otherwise. - Never send, post, buy, pay, delete or change records without my approval. - Tell me about any cost (paid plans, API usage) before I'd incur it, and help me set a spending limit. - Keep API keys and passwords out of shared docs and chats. - Privacy: Subscriber emails are stored in Supabase; post titles go to Gemini; emails are sent through Resend. Based on: https://peripheral-stack.com/blog/building-a-self-hosted-newsletter-setup-with-n8n-gemini/
Tool names link to each official site (opens in a new tab).
Running cost: Not reported Author says hosting can be practically free (Raspberry Pi plus Supabase and Resend free tiers) but doesn't state the Gemini API cost. Self-hosted How we sort costs
Stack: n8n · Gemini
App vs bot, side by side
| Old app / habit | Bot | |
|---|---|---|
| Tool | Mailchimp / Substack | Self-hosted n8n + Supabase subscribers + Gemini-written digest + Resend delivery |
| Monthly cost | Not reported | Practically zero hosting for small lists (per author); Resend's free tier covers 3,000 emails a month |
| Setup | None (already in use) | Not reported · Advanced |
| Your time | Baseline | Not reported |
| Maintenance | Handled by vendor/you as before | Watch Resend rate limits and move to batch sending as the list grows; keep the sanitizing code in place. |
| Privacy | Data stays with the app vendor | Subscriber emails are stored in Supabase; post titles go to Gemini; emails are sent through Resend. |
Full comparison
| Replaces | Mailchimp / Substack |
|---|---|
| Bot / agent stack | Self-hosted n8n + Supabase subscribers + Gemini-written digest + Resend delivery |
| Monthly cost before | Not reported |
| Monthly cost after | Practically zero hosting for small lists (per author); Resend's free tier covers 3,000 emails a month |
| Setup time | Not reported |
| Time saved | Not reported |
| Skill level | Advanced |
| Reliability | 2/5: self-maintained code (CORS, tokens, HTML sanitizing) from a single report, and AI-written content is sent with no human approval step. |
| Maintenance | Watch Resend rate limits and move to batch sending as the list grows; keep the sanitizing code in place. |
| Privacy & data | Subscriber emails are stored in Supabase; post titles go to Gemini; emails are sent through Resend. |
| Best for | Developers with a blog who want their own newsletter stack |
| Not for | Marketers who need analytics, segments and ready templates |
Pros and cons
Pros
- No platform fees or tracking scripts
- Full control of the email design
- Double opt-in and unsubscribe links built in
Cons
- Lots of custom code to secure
- AI content goes out unreviewed (add an approval step)
Source and evidence
First-person developer blog (Jun 2026) with code. Self-maintained setup; the AI-written intro and tips go to subscribers without a review step. No subscriber or run figures.
Read the original Blog source ↗
“Not reported” means the source doesn't say. We never fill gaps with guesses. Numbers marked “per author” or “vendor claim” are the source's own and weren't independently tested. Source last checked Oct 17, 2026.
Our rating is an editorial opinion based on the public source above, not lab testing. Spot an error? Request a correction.
Plain-text summary (for search and AI assistants)
Self-hosted newsletter engine with n8n and Gemini (no Mailchimp). Replaces Mailchimp / Substack with Self-hosted n8n + Supabase subscribers + Gemini-written digest + Resend delivery. Cost before: Not reported. Cost after: Practically zero hosting for small lists (per author); Resend's free tier covers 3,000 emails a month. Setup: Not reported, Advanced. Time saved: Not reported. Reliability 2/5: 2/5: self-maintained code (CORS, tokens, HTML sanitizing) from a single report, and AI-written content is sent with no human approval step. Best for: Developers with a blog who want their own newsletter stack. Not for: Marketers who need analytics, segments and ready templates. How it went (per source): The author built their blog's newsletter this way instead of signing up for Mailchimp or Substack, and calls the result a reliable, secure newsletter engine. Worth knowing: Catches they hit: n8n webhooks need CORS headers for signups from a website; re-subscribers kept a stale token until the workflow generated a fresh one; AI text must be sanitized before it goes into HTML email. Resend's free tier allows 10 requests a second and 3,000 emails a month. Source: https://peripheral-stack.com/blog/building-a-self-hosted-newsletter-setup-with-n8n-gemini/
Related recipes
More: all Marketing recipes · Best AI agents to replace Zapier · n8n vs Make: AI agent recipes compared
Questions, corrections or ideas?
Spotted an error, want a recipe covered, or have a partnership idea? Send us a message and we'll get back to you.
Starting your own newsletter? Try beehiiv ↗
What is beehiiv?
beehiiv is a newsletter platform: you write and send emails, host a newsletter website, and grow and monetize a list from one place. We've used it for our own newsletter.
beehiiv says (vendor claims, not tested by us):
- Free plan with up to 2,500 subscribers and unlimited sends
- Built-in website, recommendation network and analytics
- 0% cut of paid subscription revenue (Stripe fees apply)
Good for: starting or growing an email newsletter. Not ideal for: email automations or removing beehiiv branding on a $0 budget (those need Lite or Pro).
Free plan: $0, no card needed. Paid plans from $49/mo billed annually (Lite, up to 1,000 subscribers). People who sign up through our link get a 14-day trial plus 20% off their first 3 months, per beehiiv's partner page. Facts as of Oct 2026, from beehiiv's own website. More about beehiiv →