How to Use n8n with ._Template 150 Clay Smartlead B2B Enrichment
You have a list of 5,000 target companies in a spreadsheet and a Smartlead campaign ready to fire — but the middle is broken. Someone has to take each company, find the right decision-maker, enrich th
You have a list of 5,000 target companies in a spreadsheet and a Smartlead campaign ready to fire — but the middle is broken. Someone has to take each company, find the right decision-maker, enrich their email and firmographics in Clay, verify the address, and push it into the correct Smartlead sequence. Done by hand, that's a full-time SDR job that produces stale data and inconsistent handoffs. Template 150 (Clay ↔ Smartlead B2B Enrichment) turns that entire middle into an n8n workflow that runs on a schedule and never forgets a field.
The Problem: Enrichment and Outreach Live in Separate Silos
Clay is where your data gets rich — waterfall enrichment, job-title filtering, intent signals, email finding across multiple providers. Smartlead is where the sending happens — inbox rotation, warmup, reply detection, sequence logic. The gap between them is where most B2B pipelines leak.
The typical failure looks like this: a RevOps person exports a CSV from Clay, opens Smartlead, maps columns by hand, uploads to a campaign, and hopes nobody fat-fingered the custom variables. Two days later the same list needs a refresh because 8% of the emails bounced and Clay found better contacts. There's no audit trail, no dedupe against people already in a sequence, and no way to only send net-new leads. You're paying for two excellent tools and gluing them together with copy-paste.
The cost isn't just time. Every manual handoff introduces variable-mapping errors that break personalization ({{first_name}} renders as blank), pushes unverified emails that torch your domain reputation, and re-adds contacts who are already mid-sequence — which gets you marked as spam.
The Solution: A One-Way Enrichment Pipeline in n8n
Template 150 sits between Clay and Smartlead as a stateless, scheduled bridge. The pattern is: pull enriched rows out of Clay, validate them, filter to only verified net-new contacts, transform the payload into Smartlead's exact schema, and push them into a named campaign — logging every lead ID so the next run knows what it already sent.
The core node chain is deliberately simple so it stays debuggable:
- Schedule Trigger — runs the pipeline every few hours instead of on manual demand.
- HTTP Request (Clay webhook / table pull) — retrieves rows Clay has finished enriching.
- Filter — drops anything without a verified email or required firmographic field.
- Code / Set — maps Clay fields to Smartlead custom variables.
- HTTP Request (Smartlead API) — adds leads to the target campaign.
Because it's one-directional and idempotent, you can run it as often as you like without duplicating outreach.
Step-by-Step Setup in n8n
1. Trigger. Add a Schedule Trigger node. For most cold-outreach cadences, an interval of every 4 hours during business hours is plenty — you want fresh contacts flowing in without hammering either API. Use the "Cron" mode with an expression like 0 */4 * * 1-5 to limit it to weekdays.
2. Pull from Clay. Clay exposes enriched tables via HTTP. Add an HTTP Request node set to GET against your Clay table/export endpoint. Put your Clay API key in an HTTP Header Auth credential (header Authorization: Bearer <key>) rather than inline — never hardcode keys in the node. Alternatively, drive it the other way: configure a Clay "HTTP API" export column that POSTs each enriched row to an n8n Webhook node, so Clay pushes as soon as enrichment completes.
3. Validate. Add a Filter node with two conditions joined by AND: {{$json.email_status}} equals valid, and {{$json.email}} is not empty. This single node is what protects your sender reputation — everything that fails simply never reaches Smartlead. Add a NoOp node on the false branch so rejected rows are visible in execution history for auditing.
4. Dedupe against what you've already sent. This is the piece that keeps the pipeline safe to re-run. Use an n8n data store (or a small Postgres/Airtable node) keyed on email. Add a Code node that checks each incoming email against the store; only pass through contacts not seen before, then write the new ones back. If you're on a simpler stack, Smartlead's own "ignore duplicate leads in any campaign" flag (below) is your backstop.
5. Map fields to Smartlead's schema. Add a Set (Edit Fields) node — or a Code node for anything conditional — to build the exact structure Smartlead expects. Smartlead wants a lead_list array where each object carries email, first_name, last_name, company_name, and a custom_fields object for your personalization tokens:
{
"email": "{{$json.email}}",
"first_name": "{{$json.first_name}}",
"last_name": "{{$json.last_name}}",
"company_name": "{{$json.company}}",
"custom_fields": {
"title": "{{$json.job_title}}",
"industry": "{{$json.industry}}",
"icebreaker": "{{$json.clay_personalization}}"
}
}
Whatever keys you put in custom_fields must match the merge tags in your Smartlead sequence exactly — {{icebreaker}} in the email only renders if the field is named icebreaker here.
6. Push to Smartlead. Add a final HTTP Request node, POST to https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/leads?api_key=YOUR_KEY. Set the body to JSON, pass your mapped lead_list array, and include "settings": { "ignore_global_block_list": false, "ignore_unsubscribe_list": true, "ignore_duplicate_leads_in_other_campaign": false }. That last flag is your safety net against re-adding anyone already in another sequence. Batch leads in groups of up to 100 per request using a Loop Over Items (Split in Batches) node to respect Smartlead's payload limits.
7. Handle errors. Attach an Error Trigger workflow or set the Smartlead node's "Continue On Fail" so a single bad row doesn't halt the batch. Route failures to a Slack node so you see problems the same day.
The Benefits: Fresh Pipeline Without the Human Middleman
Once this runs, the numbers change in ways you can feel. Contacts move from "enriched in Clay" to "active in a Smartlead sequence" in hours instead of days, so your outreach hits while intent signals are still warm. Because only valid emails pass the Filter node, bounce rates drop and your domain warmup stays intact. The dedupe layer means you can run the workflow every four hours forever without a single double-send.
Operationally, you get an execution log for every lead — when it was pulled, whether it passed validation, and which campaign it landed in. That audit trail is the thing spreadsheets never give you. And because the whole pipeline is nodes, not code, an ops person can change the ICP filter or swap the target campaign without waiting on an engineer.
Common Pitfalls (and How to Avoid Them)
Custom-field name mismatches. The most common silent failure: your Smartlead email uses {{company}} but your Set node writes company_name. The email sends with a blank. Keep a single source of truth for field names and test with one lead before you open the floodgates.
Skipping email verification. If you pull straight from Clay without the Filter node, you'll push catch-all and invalid addresses into Smartlead and burn your sender reputation in a week. Never remove the validation step to "get more volume."
Rate limits. Both Clay and Smartlead throttle. If you push 5,000 leads in one request you'll get 429s. Use the Loop Over Items node with a batch size of 100 and a small Wait node (2–3 seconds) between batches.
Non-idempotent runs. If you skip the dedupe store and rely on nothing else, a re-run after a crash re-adds everyone. Always key on email and persist state, or at minimum leave Smartlead's duplicate-ignore settings on.
Hardcoded credentials. Putting API keys directly in HTTP nodes means they leak into exported JSON and execution logs. Use n8n credentials for both Clay and Smartlead so keys stay encrypted and out of your workflow exports.
Set it up once, test with a batch of five, and Template 150 becomes the reliable spine between your enrichment engine and your sending engine — the part of the pipeline you stop thinking about because it just works.