Updated April 17, 2026 · Tutorial · ~11 min read

n8n AI Agents Tutorial: Automate Sales Outreach Step by Step

Build a production-ready multi-step sales outreach agent in n8n. Takes leads from a Google Sheet, enriches them, writes personalized emails with Claude, sends via your ESP, logs every step. Under an hour, self-hostable, scales to thousands of leads/day.

Editorial disclosure: Affiliate links marked. We run the exact workflow in this tutorial in our own sales pipeline.

TL;DR

What we build: a 5-node n8n workflow — Google Sheets trigger → Clearbit enrichment → AI Agent node (Claude) for personalized email → SendGrid send → log results.

Setup time: 45-60 minutes first time, 10 minutes after you've done it once.

Monthly cost at 1,000 leads: ~$15 (self-hosted n8n $5-10 VPS + ~$5 Claude API + ~$0 SendGrid free tier).

Why n8n over Zapier: self-hostable, unlimited executions, native AI Agent node with multi-tool use, 10x cheaper at scale.

What you need before starting

  • An n8n instance. Self-hosted (Docker: docker run -it -p 5678:5678 n8nio/n8n) or n8n Cloud from $24/month.
  • An Anthropic API key — get one at console.anthropic.com. Add $10 credit to start.
  • A Google Sheet with leads (columns: name, email, company, linkedin_url).
  • A SendGrid account (or any SMTP provider).
  • Optionally: a Clearbit or Apollo API key for enrichment. Free tiers work.

The workflow we're building

High-level flow:

Google Sheets (trigger: new row) ↓ Clearbit / Apollo enrichment ↓ AI Agent (Claude) — writes personalized email using enriched data ↓ SendGrid — sends email ↓ Google Sheets update — logs outcome (sent/skipped/error)

The AI Agent node is where the intelligence lives. It reads the lead data, decides whether the lead is worth contacting, and writes a personalized opener that references something specific about the lead's company or recent activity.

Step-by-step build

Step 1

Create the n8n workflow and add the Google Sheets trigger

New workflow → search "Google Sheets Trigger" → add node. Authenticate with your Google account (OAuth). Configure:

  • Operation: "On row created or updated"
  • Document: your leads sheet
  • Sheet: the tab with your leads
  • Poll interval: 5 minutes (or webhook if you want real-time)

Test it — add a row to your sheet, see if the node fires.

Step 2

Add the enrichment node

Add HTTP Request node. Configure for Clearbit (or Apollo):

Method: GET URL: https://person.clearbit.com/v2/combined/find?email={{ $json.email }} Authentication: Basic Auth (your Clearbit API key as username, no password)

The response gives you job title, company size, industry, recent funding, LinkedIn, etc. Map these fields to variables the AI Agent can use.

Step 3

Configure the AI Agent node

This is the heart of the workflow. Add node → "AI Agent" (under AI category).

Model: Claude Sonnet 4.6 (or Opus for high-stakes leads).

System prompt:

You are a B2B sales assistant writing outreach emails for {{ YOUR_COMPANY }}. Given enriched lead data, decide if the lead is qualified and if so, write a 3-sentence personalized opener. Qualification criteria: - Company size 20-500 employees - Industry: SaaS, fintech, or e-commerce - Lead is decision-maker or director+ If qualified, output JSON: { "action": "send", "subject": "...", "body": "..." } If not qualified: { "action": "skip", "reason": "..." } Never mention you are an AI. Reference something specific about their company (recent funding, new product launch, hiring, etc.) to show research.

User prompt (with n8n variable mapping):

Lead data: Name: {{ $json.name }} Title: {{ $json.title }} Company: {{ $json.company_name }} Industry: {{ $json.industry }} Size: {{ $json.employees }} Recent news: {{ $json.news_summary }} LinkedIn: {{ $json.linkedin_url }}

Output format: JSON. Enable "parse JSON" in node options so downstream nodes can read the fields.

Step 4

Add the conditional branch and SendGrid node

Add IF node → condition: {{ $json.action === "send" }}.

True branch: SendGrid node:

  • To: {{ $('Google Sheets Trigger').item.json.email }}
  • From: your verified sender
  • Subject: {{ $json.subject }}
  • Body: {{ $json.body }}

False branch: log "skipped" with reason.

Step 5

Log the result back to Google Sheets

After both branches, add Google Sheets "Update Row" node. Update the original row with:

  • status: sent / skipped / error
  • sent_at: timestamp
  • subject_used: the generated subject
  • reason (if skipped): the AI's rationale

This gives you a full audit trail and lets you resume the workflow if anything fails mid-run.

Step 6

Test on a safe subset, then activate

Duplicate your leads sheet, keep 10 rows, route SendGrid to your own inbox first. Run workflow manually. Verify:

  • Enrichment data looks right
  • AI Agent output is coherent, personalized, JSON-parseable
  • Send/skip decisions make sense
  • Emails read like a human wrote them

After 10 clean runs, activate the workflow on your real sheet.

Expected results from production use

From our own production data (~300 leads/week through a similar workflow for 3 months):

  • Qualification rate: ~40% qualified (rest skipped by AI decision)
  • Reply rate on qualified leads: 8-15% (vs 2-4% for non-personalized templates)
  • Meeting booking rate on replies: ~30%
  • Total monthly cost: ~$15 all-in at this volume
  • Human time: ~15 minutes/week reviewing edge cases
Critical — email deliverability: Don't ramp too fast. Start at 20-50 emails/day for 2-3 weeks, then gradually increase. Warm your domain. Monitor bounce/spam rates in SendGrid. An over-automated cold outbound setup will get your domain blacklisted fast regardless of how good the AI copy is.

Scaling considerations

Cost at higher volume

At 10,000 leads/month, n8n Cloud Starter ($24) isn't enough — you'll hit execution limits. Two paths:

  • n8n Cloud Pro ($74/month): 50,000 executions. Fine for most solo ops.
  • Self-hosted n8n on DigitalOcean/Hetzner ($5-15/month VPS): unlimited executions. Recommended above 20,000/month.

Claude API costs scale linearly: ~$0.05-0.15 per lead processed depending on model and prompt length.

Reliability

  • Add retry logic on HTTP nodes (n8n supports 3 retries with exponential backoff natively).
  • Add an error-branch on the AI Agent node to fall back to a simpler template if the model fails.
  • Set up n8n error notifications to Slack/email when workflows fail.

Multi-agent patterns

Once the basic workflow is running, the next step is multi-agent orchestration:

  • Agent 1: qualifier (should we contact?)
  • Agent 2: researcher (pull specific insights from LinkedIn/news)
  • Agent 3: writer (craft the opener using research)
  • Agent 4: reviewer (catch any weird AI artifacts before send)

Each handoff in n8n is just another AI Agent node. The quality of outbound goes up meaningfully at this level of sophistication.