Automate Email Marketing with n8n: A Practical Setup
How to build email marketing automation in n8n: lead capture, segmentation, sequences, AI personalisation and reply handling, with reliability lessons from real client builds.
· updated · 8 min read
In this article8 sections
- What n8n should do, and what it should not
- Step 1: capture leads properly
- Step 2: segment from real business data
- Step 3: build the sequence as state, not as waiting
- Step 4: personalise with AI, carefully
- Step 5: handle replies, bounces and unsubscribes
- Make it reliable before you scale it
- Frequently asked questions
You can automate email marketing with n8n by letting it handle the logic (capturing leads, segmenting, deciding who gets which email and when, and reacting to replies) while a dedicated email service does the actual sending. That split is the most important design decision, and many problems come from ignoring it.
This guide walks through a setup that works for a small or mid-sized business: where contacts live, how sequences run, how to use AI for personalisation without embarrassing yourself, and how to stop one broken email from silently breaking everything after it. It assumes you already have n8n running, in the cloud or self-hosted. If you are still choosing a tool, start with n8n vs Zapier vs Make.
What n8n should do, and what it should not
n8n is an orchestrator. It is very good at pulling data from one system, making a decision and pushing the result to another. It is not a mail server, and it is not a newsletter tool with a template editor, subscriber preferences and reporting built in.
So the split looks like this:
- n8n: triggers, data lookups, segmentation, sequence logic, AI steps, routing replies, logging.
- An email sending service: delivery, bounce handling, unsubscribe headers, reputation. Transactional APIs like Resend, Postmark, Amazon SES or Mailgun fit well when n8n decides what to send. A newsletter platform fits better when marketers want to design campaigns themselves, and then n8n just keeps its audience lists up to date.
- A source of truth for contacts: your CRM, a database or, for smaller lists, a spreadsheet. Not n8n's own execution history.
Avoid sending marketing volume through the Gmail or Outlook node from someone's personal mailbox. It is fine for one-to-one follow-ups, but bulk sends from a personal mailbox run into sending limits and put that mailbox's reputation at risk.
The architecture: five small workflows
A setup that holds up usually has five workflows instead of one big one:
- Capture: receives new leads and stores them with consent and source.
- Sync and segment: pulls customer data from your business systems on a schedule and assigns segments.
- Sequence runner: runs every hour or so, finds contacts who are due for their next email and sends it.
- Event handler: receives bounces, complaints and unsubscribes from the sending service.
- Reply handler: watches the inbox and routes replies to the right person or flow.
Separate workflows are easier to test, fail independently and let you change the sequence without touching capture.
Step 1: capture leads properly
The usual trigger is a Webhook node that your website form posts to, or a native trigger like Facebook Lead Ads. I have built flows that take Facebook Lead Ads leads into email follow-ups. Whatever the source, a sound capture flow follows the same pattern: validate, deduplicate, store, then act. If webhooks are new to you, read webhooks explained first.
For each new lead:
- Normalise the email address (trim it, lowercase it) and reject obviously invalid ones.
- Look the contact up by email. Update the existing record instead of creating a duplicate.
- Store the source (which form or ad), the timestamp and what the person agreed to receive.
- If you use double opt-in, send a confirmation email and start the sequence only after the click.
- Set the contact's sequence state, for example step 0 and the time the first email is due.
Storing consent and source is not busywork. Under GDPR you need to be able to show why you are allowed to email someone, and this record is how you show it. It is also how you later learn which channels bring leads that actually buy.
Step 2: segment from real business data
The best segments come from what customers have done, not from what they typed into a form. That data usually lives in your booking, ERP or field service system, and most of those have an API.
A spreadsheet is a good way to make segments visible to the people who run the campaigns, but treat it as a view rather than a database. If workflows write to the list constantly, or several workflows write at once, move the source of truth into a real database and export a sheet for humans to read.
Useful segment dimensions for most service businesses:
- Recency: when the customer last bought or booked.
- Service or product type: what they bought, which decides what is relevant to offer next.
- Region or office: who should sign the email and handle replies.
- Lifecycle stage: lead, first-time customer, repeat customer, lapsed.
Step 3: build the sequence as state, not as waiting
The tempting way to build a drip sequence in n8n is one execution per lead: send email 1, Wait node for three days, send email 2, wait again. n8n can do this, because long waits are stored in its database. It is still the wrong pattern for marketing. Every waiting execution is a frozen copy of the logic as it was when the lead arrived. Changing email 3 does not affect the hundreds of leads already waiting, and they are hard to inspect or cancel.
A sturdier pattern stores the state on the contact and lets a scheduled workflow do the work:
{
"email": "anna@example.com",
"segment": "lapsed-customer",
"sequence": "winback",
"step": 1,
"next_send_at": "2026-11-02T08:00:00Z",
"status": "active"
}
A Schedule Trigger runs every hour and selects contacts where status is active and next_send_at has passed. For each one it picks the template for the current step, sends it, increments step and sets the next date. Stopping a sequence becomes a status change. Editing an email affects everyone who has not received it yet. And "who got what, and when" becomes a simple query. Scheduling itself is covered in more depth in the cron jobs guide.
Process due contacts in batches with the Loop Over Items node and respect your sending service's rate limits. Sending a few thousand emails in one burst from a fresh domain is a reliable way to land in spam.
Step 4: personalise with AI, carefully
Language models are good at turning structured customer data into a natural opening line or picking the most relevant offer. They are also good at inventing things. A few rules keep it safe:
- Give the model only structured, verified fields (first name, last service, region, segment) and tell it to use nothing else.
- Constrain the output. Ask for one or two sentences, or a JSON object with fixed fields, and insert them into a template you control. Do not let the model write the whole email, footer and unsubscribe link included.
- Use a small model. For a personalised line, a small and cheap model is usually enough, and faster.
- Have a fallback. If the AI step fails, or returns something empty or too long, use a generic line instead of blocking the send.
- Read a sample before every new campaign. Read twenty generated emails yourself before sending to two thousand people.
I have built AI-personalised email and SMS campaigns for a client, and these are the rules I would start any new campaign from.
Step 5: handle replies, bounces and unsubscribes
Marketing automation that ignores what comes back is just a broadcast. Return traffic comes in three kinds.
Bounces and complaints come from your sending service, usually as webhooks. Mark hard bounces and spam complaints as permanently suppressed. Continuing to mail them damages your sender reputation, and the email deliverability guide explains why.
Unsubscribes must be honoured quickly and everywhere. Include a visible unsubscribe link and the one-click List-Unsubscribe headers described in RFC 8058, which large mailbox providers now expect from bulk senders.
Replies are the valuable part. People answer marketing emails with questions, bookings and complaints, and those need to reach a human.
Putting a unique reference in the subject when you send makes this kind of matching far simpler than parsing the reply text.
You can go further with an AI step that reads each reply, classifies the intent (interested, question, not interested, complaint) and creates a ticket or task when interest is high. Keep a human in the loop for anything the model is unsure about.
Make it reliable before you scale it
Email automation fails quietly. Nobody complains about an email they never received. These are the safeguards worth adding before anything goes live:
- One failure must not block the rest. When we reviewed Walldy's own meeting reminder flow before go-live, one failed booking email turned out to block later reminders. Process each contact independently and log failures per contact.
- Make sends idempotent. Before sending, check a send log for the combination of contact, sequence and step. If the workflow retries, nobody gets the same email twice.
- Do not swallow errors. "Continue on error" on every node hides problems. Use it deliberately, and add an error workflow with the Error Trigger node that notifies a person when something breaks.
- Prune execution data. Do not store successful executions by default. Your send log is the record, not n8n's history.
- Watch the numbers weekly. Sends, bounces, complaints, unsubscribes and replies per campaign. A sudden change usually means a bug.
Frequently asked questions
Can n8n replace Mailchimp?
n8n can replace the automation part (segmentation, sequences and triggers) but not the sending infrastructure or the visual campaign editor. Most setups pair n8n with a sending service, or keep a newsletter tool and let n8n feed it.
What is the best email service to use with n8n?
Any service with a solid API and webhooks for bounces works, for example Resend, Postmark, Amazon SES or Mailgun. Choose one with good deliverability tooling and an EU data option if you handle EU personal data.
How do I create a drip campaign in n8n?
Store each contact's sequence step and next send time, then run a scheduled workflow that sends whatever is due and advances the step. It is easier to change and audit than one long-running execution per lead with Wait nodes.
Can n8n send personalised emails with AI?
Yes. Pass structured customer fields to an AI node, ask for a short, constrained output such as an opening line, and insert it into your own template with a fallback in case the AI step fails.
How do I stop n8n from sending the same email twice?
Keep a send log keyed on contact, sequence and step, and check it right before each send. Retries and overlapping runs then become harmless.
- n8n
- Email Marketing
- Automation

Written by Pontus Henriksson
Co-founder and CEO of Walldy in Sundsvall. I have built for the web since I was fourteen, tested games for studios like Netflix and Bungie since 2021, and write about what I use in real projects.
Liked this? Get the next one.
New Claude skills, kits and what I learn building AI for small businesses. Not often, only when it is worth sending. Unsubscribe with one click.