How to Build a Cold Email Agent in n8n (Step-by-Step)
By the end of this you'll understand exactly how an AI cold email agent works in n8n — one that writes a unique email for every prospect, spaces sends to protect your domain, and never contacts anyone twice. No coding required, just connecting nodes and pasting a couple of API keys.
What you'll need
- n8n — free cloud trial or self-hosted.
- An AI API key — Claude or OpenAI. This writes the emails.
- A sender — Resend (free tier) or any SMTP.
- A prospect list — a Google Sheet with columns for name, company, email, and a personalization "hook."
Step 1 — Set up your prospect sheet
Create a Google Sheet with these columns: first_name, company, email, hook, status. The hook is the one detail that makes the email feel human — "just opened a second location," "hiring an SDR," "your reviews mention slow response times." The status column starts as pending and the agent flips it to sent.
Step 2 — Add a schedule trigger
In n8n, start your workflow with a Schedule Trigger node set to fire on a sensible cadence — weekdays at 10am is a good default. This is what makes it run on its own.
Step 3 — Fetch and limit your prospects
Add a Google Sheets node to read rows where status = pending. Then add a small Code node that takes only the first 5 per run. This batch limit is critical — blasting hundreds of emails on day one is how you get flagged as spam. Start slow, ramp over weeks.
Step 4 — Personalize with AI
Add an HTTP Request node calling your AI model. The prompt should instruct it to return a short, personalized email (subject + body) using the prospect's hook, with one clear ask. The key word is personalized — this is what separates an agent from a spam blast. Each prospect gets a genuinely different message.
Step 5 — Send (with a compliant footer)
Add an HTTP Request to Resend (or an SMTP node). Append a CAN-SPAM-compliant footer to every email: a real postal address and a "reply STOP to opt out" line. This isn't optional — it's the law, and skipping it gets your domain blacklisted.
Step 6 — Wait, then mark as sent
Add a Wait node (60 seconds between sends spaces them out for deliverability), then a final Google Sheets node that updates each row's status to sent with a timestamp. This is your dedup safety net — nobody ever gets the same email twice.
That's the whole agent
Six nodes: schedule → fetch → limit → personalize → send → log. Turn it on and it runs your cold outreach while you sleep, for the cost of an AI call per email. Add a follow-up branch later (no reply after 72 hours → second touch) and you've got a full sequence.
Want it pre-built instead of wiring six nodes?
The Cold Email Engine is this exact workflow, already built, sanitized, and documented as a one-click n8n import — plus 3 tuned AI prompts, a prospect template, and a CAN-SPAM checklist. Import it, paste your keys, send in an afternoon.
Get the Cold Email Engine — $39 Start with the free promptsCommon mistakes to avoid
- Sending too much too fast. Warm up. 5–10/day on a new domain, ramp slowly.
- Fake personalization. "{first_name}, I love what you're doing" fools no one. Use a real hook.
- No suppression list. When someone says stop, they must never hear from you again — automate it.
- Using your main domain. Send cold from a separate domain so a reputation dip never touches your primary inbox.
Build it once and cold outreach stops being a chore you avoid and becomes a system that runs itself. Start with the free prompts, wire the six nodes, and you're live.