Skip to main content

n8n Email Marketing Automation: Build a Drip Sequence That Stops on Unsubscribe

Build an email drip sequence in n8n: a subscriber table, a scheduled sender, one-click unsubscribe headers and the Gmail sender rules it has to meet.

Founder of IImagined.ai

Published
Feb 25, 2026
Updated
Oct 13, 2026
Reading time
11 min read
Quick answer

To run email marketing automation in n8n, keep subscribers in a Data Table with a step number and a next send date, and let a Schedule Trigger workflow send whatever is due and move the row forward. Send through an email API with the HTTP Request node so each message carries one-click unsubscribe headers, and record unsubscribes with a webhook. A Wait-node chain is fine for three emails; the table is what survives unsubscribes and edits.

To run email marketing automation in n8n, store each subscriber as a row in a Data Table with a step number and a next send date, then let a Schedule Trigger workflow send whatever is due and move the row forward. Send through an email API with the HTTP Request node, so every message can carry the one-click unsubscribe headers Gmail asks bulk senders for, and record unsubscribes with a webhook that updates the same row.

Checked October 2026 against n8n's docs for the Wait, Schedule Trigger, Data Table, n8n Form, Webhook, HTTP Request and Send Email nodes, its expression reference and its pages on data tables and executions, Google's email sender guidelines and Workspace sending limits, Resend's send email reference, unsubscribe header guide and pricing, and RFC 8058. The node settings below are written from those docs, not exported from a running instance: build it, then test with your own address before a subscriber sees it.

This tutorial belongs to our n8n hub. It suits someone who already runs n8n and wants a welcome or nurture sequence without paying per subscriber. If you have no list yet, start with how to start an email list, which covers the free email platforms that do all of this for you at small sizes.

Why build a sequence at all: Omnisend's 2026 Ecommerce Marketing Report, which covers 27 billion emails sent through Omnisend in 2025, found that automated emails were 2% of sends and drove 30% of email revenue. That is Omnisend's measurement across its own ecommerce merchants, not a result to expect: automated emails reach people who have just shown interest, which is a big part of why they convert better.

n8n email sequence: two patterns, and which to pick

There are two ways to make n8n wait between emails. One pauses each subscriber's execution with the Wait node. The other keeps the state in a table and wakes up on a schedule. Pick before you build, because they do not convert into each other.

Wait-node chainScheduled table
Where a subscriber's progress livesInside a paused executionIn a table row you can read and edit
How the delay worksWait node: After Time Interval or At Specified TimeSchedule Trigger runs hourly and sends what is due
Stopping on unsubscribeCheck a list before every send, or the paused run mails anywaySet the row to unsubscribed; the next run skips it
Changing the sequence laterYou have to account for runs already paused mid-sequenceEdit the sequence definition; the next run reads it for every row
Executions countedOne per signupOne per schedule run, whatever the list size
Which clock it usesn8n server time, regardless of the workflow timezoneThe workflow timezone, or the instance timezone
Good forThree emails over a weekAnything longer, or anything you will edit
The same sequence, built two ways
Wait-node chain
  • Form Trigger, send, Wait 2 days, send, Wait 2 days, send
  • One workflow, quick to draw
  • Each subscriber is one long paused execution
  • Unsubscribe needs a lookup before every send
Scheduled table
  • Signup workflow, sender workflow, unsubscribe workflow
  • Three small workflows around one table
  • Each subscriber is one row
  • Unsubscribe is one field on that row

The Wait node is sound engineering: n8n's docs say that when a workflow pauses it "offloads the execution data to the database" and reloads it when the wait ends (waits under 65 seconds stay in memory). The weakness is yours to manage, not n8n's: a person who unsubscribes on day three still has a paused run holding emails four and five. The rest of this page builds the table pattern.

What you need before you build

Pre-flight for an n8n email sequence
  • An n8n instance on a public HTTPS address, so the form and the unsubscribe webhooks can be reached
  • A sending domain you own, with SPF or DKIM set up through your email service
  • An email API key (this page uses Resend) or SMTP details for another service
  • A Data Table for subscribers, created from the Data tables tab in your project
  • The emails themselves, written before you wire anything
  • A signup form that says plainly what people will receive
  • An error workflow, so a failed send tells you about it

Two notes on the list. Data tables are meant for "light to moderate data storage": n8n caps all tables on an instance at 200 MiB by default, which is far more than a subscriber list needs. And a failed send should not pass quietly; the n8n Error Trigger guide has an alert workflow you can attach.

Step 1: create the subscriber table

One table holds everything the sequence needs to know. Data table columns can be Boolean, Date, Number or String.

ColumnTypeWhat it holds
emailStringThe address. Checked for duplicates at signup.
first_nameStringOptional, for the greeting.
tokenStringA hard-to-guess string that identifies the row in unsubscribe links.
stepNumberIndex of the next email to send. Starts at 0.
next_send_atDateWhen that email is due. Starts at the signup time.
statusStringactive, unsubscribed or done.

The token column matters more than it looks. RFC 8058 says the unsubscribe address must carry enough information to identify the recipient, and that the unsubscribe request must not include cookies or HTTP authorization. It also recommends an opaque, hard-to-forge identifier. A hashed token in the link covers all three without putting the email address in a URL.

Step 2: the signup workflow

From form to first row
  1. 1
    n8n Form Trigger

    Two fields: email (required) and first name. Expected result: the node shows a Test URL and a Production URL.

  2. 2
    Data Table: If Row Does Not Exist

    Condition: email Equals the submitted address. Expected result: a repeat signup stops here and no second row appears.

  3. 3
    Data Table: Insert

    Map email and first_name from the form; set step to 0, status to active and next_send_at to {{ $now.toISO() }}. Expected result: one new row.

  4. 4
    Set the token in the same Insert

    Use the expression shown under these steps: a SHA-256 hash of the address plus a secret phrase only you know. Expected result: a 64-character token on the row.

  5. 5
    Publish

    Share the Production URL. Expected result: a real submission creates a row and shows under Executions.

token   {{ ($json.email.toLowerCase() + 'REPLACE-WITH-A-LONG-SECRET-PHRASE').hash('sha256') }}

The expression assumes the form field is named email; use your own field name if it differs. hash() is one of n8n's own string functions and takes the algorithm as its argument.

Setting next_send_at to the signup time means the next hourly run sends email one. If you want it within seconds, add a copy of the send step to the end of this workflow and insert the row at step 1. Google's guidelines also recommend that you "confirm each recipient's email address before subscribing them": to add that, insert the row with status pending and flip it to active from a confirmation link, using the same webhook method as Step 4.

Step 3: the sender workflow

One hourly run of the sender
  1. 01
    Schedule Trigger

    Every hour. The workflow must be published to run.

  2. 02
    Data Table: Get

    status Equals active, and next_send_at Less Than or Equal to now.

  3. 03
    Pick email

    Code node: match each row's step to an email and build the payload.

  4. 04
    If

    send is true goes on; rows past the last step are marked done.

  5. 05
    Send email

    HTTP Request to the email API, with the unsubscribe headers.

  6. 06
    Advance row

    Data Table Update: step plus one, and the next send date.

In the Get operation, set Must Match to All Conditions, add the two conditions with {{ $now.toISO() }} as the date value, and turn Return All off with a Limit that fits your sending plan. The sequence itself lives in one Code node, so editing an email never means redrawing the workflow:

// Code node: "Pick email". One entry per step.
// gapDays = how long to wait AFTER this email before the next one.
const UNSUB_PAGE = 'PASTE the Production URL of the GET webhook';
const UNSUB_POST = 'PASTE the Production URL of the POST webhook';

const SEQUENCE = [
  { subject: 'Your checklist, as promised', gapDays: 2, html: '<p>Hi [[name]], here is the checklist you asked for.</p>' },
  { subject: 'The step most people skip',   gapDays: 2, html: '<p>Hi [[name]], one thing to do before anything else.</p>' },
  { subject: 'A worked example',            gapDays: 3, html: '<p>Hi [[name]], here is the whole process on a real case.</p>' },
  { subject: 'Questions people ask',        gapDays: 3, html: '<p>Hi [[name]], the five questions I get most.</p>' },
  { subject: 'What to do next',             gapDays: 0, html: '<p>Hi [[name]], if this was useful, here is the next step.</p>' },
];

return $input.all().map(item => {
  const row = item.json;
  const mail = SEQUENCE[row.step];
  if (!mail) return { json: { ...row, send: false } };

  const page = UNSUB_PAGE + '?t=' + row.token;
  const post = UNSUB_POST + '?t=' + row.token;
  return { json: {
    ...row,
    send: true,
    gapDays: mail.gapDays,
    isLast: row.step === SEQUENCE.length - 1,
    payload: {
      from: 'Maya <hello@mail.example.com>',
      to: [row.email],
      subject: mail.subject,
      html: mail.html.replace('[[name]]', row.first_name || 'there')
        + '<p><a href="' + page + '">Unsubscribe</a></p>',
      headers: {
        'List-Unsubscribe': '<' + post + '>',
        'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click',
      },
    },
  } };
});

Then the two nodes that do the work:

HTTP Request node: "Send email"
  Method                POST
  URL                   https://api.resend.com/emails
  Authentication        Generic Credential Type > Header Auth
                        Name: Authorization   Value: Bearer <your API key>
  Send Body             on, Body Content Type: JSON, Specify Body: Using JSON
  JSON                  {{ JSON.stringify($json.payload) }}
  Options > Batching    Items per Batch: 5   Batch Interval (ms): 1000

Data Table node: "Advance row"   (Resource: Row, Operation: Update)
  Mapping Column Mode   Map Each Column Manually
  Condition             token  Equals  {{ $('Pick email').item.json.token }}
  step                  {{ $('Pick email').item.json.step + 1 }}
  next_send_at          {{ $now.plus($('Pick email').item.json.gapDays, 'days').toISO() }}
  status                {{ $('Pick email').item.json.isLast ? 'done' : 'active' }}
  • Why HTTP Request and not Send Email. The Send Email node speaks SMTP and its docs list no option for custom headers; they state it "does not support setting headers like In-Reply-To and References". Resend's API takes a headers object, which is where the unsubscribe headers go. Any email API with custom headers works the same way.
  • Why Batching. Resend's default rate limit is 10 requests per second per team. Five items a second leaves room for your other workflows.
  • Why the date maths sits in the Update node. n8n's plus(n, unit) shorthand works in expressions only. Its docs warn that in the Code node the same call "will not raise an error but will not add" the days.
  • Send first, then advance. If the send fails, the row is untouched and the next run tries again. Turn on Retry On Fail in the HTTP Request node's Settings for brief outages.

For other schedules, the n8n cron expression generator writes the Custom (Cron) value, and the n8n expressions cheat sheet has more date expressions.

Step 4: one-click unsubscribe with a webhook

Every email needs two ways out: a visible link a person clicks, and a header a mail app can call for them. Google's guidelines give the header pair, and Resend's docs describe what your endpoint must do: on a POST, "return a blank page with 200 (OK) or 202 (Accepted)", and show the regular unsubscribe page on a GET.

  1. POST webhook. Add a Webhook node with HTTP Method POST, Authentication None, Respond set to Immediately and the No Response Body option turned on. Connect a Data Table Update: condition token Equals {{ $json.query.t }}, set status to unsubscribed. Expected result: a POST to the Production URL with ?t= and a real token flips that row.
  2. GET webhook. In a second workflow, add a Webhook node with HTTP Method GET and Respond set to Using 'Respond to Webhook' Node. Run the same Update, then a Respond to Webhook node that returns one line of text saying the address has been removed.
  3. Paste both Production URLs into the two constants at the top of the Code node, and publish all three workflows.

Resend's guide adds a deadline worth copying whatever service you use: make sure people stop receiving email within 48 hours of the request. With this design the next hourly run already skips the row. The n8n webhook guide covers test and production URLs if the endpoint does not answer.

The sender rules your sequence has to meet

Building the workflow is the easy half. Whether the mail arrives is decided by rules the mailbox providers publish. These are from Google's email sender guidelines, with where each one lands in this build.

RuleApplies toWhere it lives in this build
Authenticate with SPF or DKIMAll sendersDNS records on the sending domain; verify the domain with your email service
SPF, DKIM and DMARC5,000 or more messages a dayAdd a DMARC record; the From domain must match the authenticated domain
One-click unsubscribe headersMarketing mail from senders above 5,000 a dayList-Unsubscribe and List-Unsubscribe-Post on every message, set in the HTTP Request body
An easy way to unsubscribeEveryoneA visible link in every email that hits the unsubscribe webhook
Only people who opted inEveryoneThe form is the only way into the table; never import a bought list
One address in the From headerEveryoneA fixed sender such as hello@mail.example.com for the whole sequence
Raise volume slowlyEveryoneCap the rows per run with the Get operation's Limit, and raise it over weeks
Daily numbers that shape the design
Resend free plan, emails a day
100
Google Workspace, messages a day per user
2,000
Gmail bulk-sender threshold, messages a day
5,000

Below the first two you are inside a free or included allowance. Above the third, DMARC and one-click unsubscribe become requirements. Source: Resend pricing, Google Workspace Help and Gmail Help, checked October 2026

The Workspace figure is why the Gmail node is the wrong sender for a list: 2,000 a day is a ceiling for a mailbox, and Google warns that spam reports can lower a domain's reputation over time, which is a poor trade for the domain your everyday mail uses. Use a sending service on a subdomain. Resend's domain docs suggest a subdomain for exactly this, to keep reputation separate.

A worked example: a five-email welcome sequence

The sequence in the Code node above, laid out for one subscriber who signs up on a Monday. The content plan is illustrative; the timings follow from the gapDays values.

One subscriber, eleven days
  1. Day 0
    Email 1: deliver what was promised

    Row: step 0 to 1, next send in 2 days.

  2. Day 2
    Email 2: the step most people skip

    Row: step 1 to 2, next send in 2 days.

  3. Day 4
    Email 3: a worked example

    Row: step 2 to 3, next send in 3 days.

  4. Day 7
    Email 4: questions people ask

    Row: step 3 to 4, next send in 3 days.

  5. Day 10
    Email 5: what to do next

    Row: step 4 to 5, status done. The Get operation never returns it again.

If she unsubscribes on day five, the row reads step 3, status unsubscribed, and that is the end of it: no paused execution to hunt down. What goes in those five emails is a writing problem, not an n8n one. The Digital Products program covers it in its lessons on the welcome sequence, email sequences and the five-day email launch.

Troubleshooting

  • Nothing sends. The sender is not published. n8n's docs: a workflow that uses the Schedule node as a trigger must be saved and published.
  • It sends at the wrong hour. The Schedule Trigger uses the workflow timezone, then the instance timezone, which defaults to America/New York on self-hosted instances.
  • Runs were skipped after downtime. By default missed executions are discarded. With this design that is harmless: the next run picks up every row that is due.
  • The date never moves forward. The plus(n, unit) call is in a Code node. Move it to the Update node's expression.
  • Someone got an email twice. Two runs overlapped, or the Update failed after the send. Keep the Limit low enough that a run finishes inside the hour, and read how n8n workflows fail silently.
  • Provider returns 429. You are over its rate limit. Lower Items per Batch or raise the Batch Interval.

n8n email automation: FAQ

Can n8n be used for email marketing automation?

Yes, for sequences you define yourself. n8n has no campaign editor, subscriber list or unsubscribe handling built in, so you build those: a Data Table for subscribers, a Schedule Trigger workflow that sends whatever is due, and a webhook that records unsubscribes. In return you control the logic and the data. If you want templates, list hygiene and reports out of the box, an email platform is less work.

How do I create an email sequence in n8n?

Store each subscriber as a row with a step number and a next send date. A workflow on a Schedule Trigger gets the rows that are due, picks the email for each row's step, sends it, then writes the next step and date back to the row. A second workflow adds new subscribers from a form, and a third marks a row unsubscribed when someone clicks the link.

Should I use the Wait node or a Schedule Trigger for a drip campaign?

Use the Wait node for a short, fixed series you will not edit, such as three emails over a week. Use a Schedule Trigger with a subscriber table for anything longer. With Wait, each subscriber is a paused execution that has to check for an unsubscribe before every send. With a table, the state is one row you can read, edit or stop at any time.

Does n8n add an unsubscribe link to emails?

No. n8n sends what you give it. You add the link to the email body and the List-Unsubscribe headers to the message, and you build the webhook that receives the click and updates the subscriber. Gmail requires one-click unsubscribe on marketing mail from anyone sending more than 5,000 messages a day, and its guidelines tell every sender to give recipients an easy way to unsubscribe.

How many emails can n8n send per day?

n8n does not set the ceiling; your sending service does. Google Workspace lists a daily sending limit of 2,000 messages per user account, and Resend's free plan lists 100 emails a day and 3,000 a month. An email API or SMTP service on a paid plan raises that. Pace the sends with the HTTP Request node's Batching option so you stay inside the provider's rate limit. Checked October 2026.

Do I need SPF, DKIM and DMARC to send from n8n?

You need SPF or DKIM at any volume, and all three once you send 5,000 or more messages a day to Gmail accounts, according to Google's email sender guidelines. They are DNS records on your sending domain, set up at your domain provider or through your email service, not inside n8n. Messages that are not authenticated may be marked as spam or rejected.

How many n8n executions does an email sequence use?

It depends on the pattern. n8n's docs say a Schedule Trigger counts one execution every time it fires, so an hourly sender uses 24 a day whatever the list size. A webhook or form trigger counts one for each inbound request, so a Wait-node chain uses one per signup. Signups and unsubscribes add one each in both designs.

Free · no card needed

Start with the free Starter Kit.

A unit economics calculator from AI SaaS Builder, plus four more working files.

Starter Kit5 files · free
All Access · all four programs · $99/mo

The workflow sends the emails. The emails still have to earn the reply.

All Access covers both sides. Digital Products has the lessons on the lead magnet, the welcome sequence and the five-day email launch that fill this workflow, and AI SaaS Builder covers Supabase, the Claude API, deployment and Stripe billing for when an automation becomes a product. The other two programs, live coaching and the private community are included.

See All Access: $99/mo →30-day money-back guarantee