Zapier charges you per task. Make charges you per operation. And both of them lock your automation logic into a platform you don’t control.
If you’re a developer - or a team with a developer - there’s a better option. n8n is an open-source workflow automation tool that you can self-host, customize without limits, and run without per-execution pricing. When you combine it with Leadpipe’s real-time webhooks, you get a visitor identification automation layer that’s as flexible as code but as visual as a no-code tool.
This guide covers everything: n8n setup, webhook configuration, conditional routing, multi-step enrichment workflows, code node examples for custom logic, and production-ready workflow templates.
Why Developers Prefer n8n
If your team is already using Zapier and it’s working fine, you don’t need to switch. But if any of these apply, n8n is worth considering:
| Concern | Zapier | n8n |
|---|---|---|
| Cost at scale | $0.01-0.03 per task, adds up fast | Free (self-hosted) or $24/mo (cloud) |
| Vendor lock-in | Your logic lives in Zapier’s platform | Self-host, export workflows as JSON |
| Custom code | Limited code steps, sandboxed | Full JavaScript/Python in Code nodes |
| Error handling | Basic retry logic | Advanced error workflows, custom retry |
| Data privacy | Data passes through Zapier servers | Self-hosted = data stays on your infra |
| API flexibility | Pre-built connectors only | HTTP Request node for any API |
| Branching logic | Zapier Paths (limited) | Unlimited IF/ELSE, Switch, Merge nodes |
For high-volume Leadpipe users processing 1,000+ identified visitors per month, n8n’s self-hosted option saves significant money. At 1,000 visitors/month with 5 actions per visitor, you’d pay $150-300/month in Zapier tasks. n8n self-hosted costs $0 in execution fees.
For a comparison of Zapier-based approaches, see our Zapier automation recipes.
What You’ll Need
- Leadpipe account - Start free with 500 leads
- n8n instance - self-hosted (Docker, npm) or n8n Cloud
- Target systems - CRM, Slack, email platform, enrichment APIs
- Basic comfort with JSON - n8n is visual, but you’ll work with webhook payloads
Quick n8n Setup (Docker)
If you don’t have n8n running yet:
As described in <a href="https://docs.n8n.io/hosting/installation/docker/" rel="noopener" target="_blank">n8n's Docker installation guide</a>:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
n8nio/n8n
Open http://localhost:5678 and you’re ready.
Workflow 1: Basic Webhook to CRM
The foundational workflow. Every identified visitor becomes a CRM lead.
Step 1: Webhook Trigger Node
- In n8n, create a new workflow
- Add a Webhook node (trigger)
- Set HTTP method to POST
- Copy the webhook URL
- Add this URL to Leadpipe: Settings > Integrations > Webhooks
- Select First Match trigger type in Leadpipe
- Send a test event
The webhook node receives the full Leadpipe payload:
{
"email": "sarah.chen@acmecorp.com",
"first_name": "Sarah",
"last_name": "Chen",
"company_name": "Acme Corp",
"job_title": "VP of Marketing",
"linkedin_url": "https://linkedin.com/in/sarahchen",
"page_url": "/pricing",
"visit_duration": 187
}
Step 2: Filter Node (ICP Check)
Add an IF node to filter for business emails:
Condition: {{$json.email}} does not contain "gmail.com"
AND: {{$json.email}} does not contain "yahoo.com"
AND: {{$json.email}} does not contain "hotmail.com"
True path continues to CRM. False path stops (or routes to a separate tracking workflow).
Step 3: CRM Node
Add a CRM node based on your system:
HubSpot:
- Node: HubSpot > Create/Update Contact
- Map: email, firstName, lastName, company, jobtitle
Salesforce:
- Node: Salesforce > Create Lead
- Map: Email, FirstName, LastName, Company, Title
Pipedrive:
- Node: Pipedrive > Create Person
- Map: name, email, org_id (lookup by company_name first)
Any CRM via API:
- Node: HTTP Request > POST to your CRM’s API endpoint
- Body: mapped Leadpipe fields
For CRM-specific details, see the Salesforce, Pipedrive, or HubSpot integration guides.
Workflow 2: Intent-Based Routing
Route visitors to different actions based on which pages they viewed. This is where n8n’s flexibility shines - unlimited branching without per-path charges.
Switch Node Setup
Add a Switch node after the filter:
Rules:
1. page_url contains "pricing" OR "demo" → Output 1 (Hot)
2. page_url contains "features" OR "product" OR "case-studies" → Output 2 (Warm)
3. page_url contains "blog" → Output 3 (Nurture)
4. Default → Output 4 (Track only)
Hot Path (Output 1)
Switch → Slack Alert → CRM Lead (Rating: Hot) → Email Sequence Enrollment
- Slack node: Send message to #sales-hot-leads with visitor details
- CRM node: Create lead with hot rating
- HTTP Request node: Enroll in Outreach or Salesloft sequence via API
Warm Path (Output 2)
Switch → CRM Lead (Rating: Warm) → Nurture Email → Task Creation
- CRM node: Create lead with warm rating
- Email node: Send a resource relevant to the page they viewed
- CRM node: Create follow-up task for rep (48-hour deadline)
Nurture Path (Output 3)
Switch → CRM Lead (Rating: Cold) → Newsletter Subscription
- CRM node: Create lead with cold rating
- HTTP Request node: Add to email marketing list (Mailchimp, ActiveCampaign, etc.)
Track Only Path (Output 4)
Switch → Google Sheets Row
Log to a tracking spreadsheet for pattern analysis without cluttering your CRM.
Workflow 3: Enrichment Pipeline (Identify → Enrich → Qualify → Route)
This is n8n’s killer workflow. Chain multiple API calls together to enrich visitor data before routing to your CRM.
The Flow
Leadpipe Webhook
→ Filter (business email)
→ Clay API (company enrichment)
→ Code Node (ICP scoring)
→ Switch (score-based routing)
→ CRM + Slack + Sequence
Step 1: Clay Enrichment
Use the HTTP Request node to call Clay’s API for company enrichment:
// HTTP Request Node
Method: POST
URL: https://api.clay.com/v3/people/enrich
Headers: {
"Authorization": "Bearer YOUR_CLAY_API_KEY",
"Content-Type": "application/json"
}
Body: {
"email": "{{$json.email}}"
}
Clay returns company revenue, employee count, industry, tech stack, and more. See the Clay + HubSpot integration for details on Clay enrichment.
Step 2: ICP Scoring (Code Node)
Add a Code node to calculate an ICP score based on Leadpipe + Clay data:
const visitor = $input.first().json;
let score = 0;
// Page intent scoring
if (visitor.page_url?.includes('pricing')) score += 30;
else if (visitor.page_url?.includes('demo')) score += 30;
else if (visitor.page_url?.includes('features')) score += 20;
else if (visitor.page_url?.includes('case-studies')) score += 15;
else if (visitor.page_url?.includes('blog')) score += 5;
// Visit duration scoring
if (visitor.visit_duration > 300) score += 20;
else if (visitor.visit_duration > 120) score += 10;
else if (visitor.visit_duration > 60) score += 5;
// Job title scoring
const title = (visitor.job_title || '').toLowerCase();
if (/\b(ceo|cto|cfo|cmo|coo|founder|president)\b/.test(title)) score += 25;
else if (/\b(vp|vice president|director|head of)\b/.test(title)) score += 20;
else if (/\b(manager|lead|senior)\b/.test(title)) score += 10;
// Company size scoring (from Clay enrichment)
const employees = visitor.company_employee_count || 0;
if (employees >= 500) score += 20;
else if (employees >= 100) score += 15;
else if (employees >= 20) score += 10;
// Revenue scoring (from Clay enrichment)
const revenue = visitor.company_revenue || 0;
if (revenue >= 50000000) score += 20;
else if (revenue >= 10000000) score += 15;
else if (revenue >= 1000000) score += 10;
return [{
json: {
...visitor,
icp_score: score,
icp_tier: score >= 60 ? 'A' : score >= 40 ? 'B' : score >= 20 ? 'C' : 'D'
}
}];
Step 3: Score-Based Routing (Switch Node)
Route by ICP tier:
| Tier | Score | Action |
|---|---|---|
| A (60+) | High-intent ICP match | Slack alert + CRM lead (hot) + sequence enrollment + task for AE |
| B (40-59) | Good fit, moderate intent | CRM lead (warm) + nurture sequence |
| C (20-39) | Possible fit, low intent | CRM lead (cold) + marketing list |
| D (0-19) | Poor fit | Log to spreadsheet, no CRM entry |
This workflow ensures your CRM only contains leads worth working. Your reps never waste time on poor-fit visitors, and your highest-value prospects get immediate attention.
Workflow 4: Multi-Channel Alert System
Send identified visitor notifications to different channels based on context:
Leadpipe Webhook
→ IF pricing page → Slack #sales-hot-leads + Email to AE + SMS (optional)
→ IF target account → Slack #abm-alerts + CRM note
→ IF competitor page → Slack #competitive-intel
→ Default → Slack #website-visitors
Slack Message Template (Code Node)
const v = $input.first().json;
const duration = Math.floor(v.visit_duration / 60);
const seconds = v.visit_duration % 60;
const message = [
`*${v.first_name} ${v.last_name}* - ${v.job_title}`,
`Company: ${v.company_name}`,
`Email: ${v.email}`,
`LinkedIn: ${v.linkedin_url}`,
`Page: ${v.page_url}`,
`Time on page: ${duration}m ${seconds}s`,
].join('\n');
return [{ json: { message, channel: '#sales-hot-leads' } }];
For more Slack alert patterns, see Leadpipe + Slack Visitor Alerts.
Workflow 5: Deduplication and Return Visitor Tracking
n8n gives you full control over deduplication logic - something that’s limited in Zapier:
Deduplication with Database Lookup
Leadpipe Webhook
→ PostgreSQL Query: SELECT * FROM leads WHERE email = '{{email}}'
→ IF exists:
→ Update record (add new page view to activity log)
→ IF page_url = '/pricing' AND previous visits didn't include pricing:
→ Upgrade lead status to "Hot"
→ Send Slack alert: "Return visitor now on pricing page!"
→ IF not exists:
→ Create new lead in DB + CRM
→ Start sequence
Code Node for Dedup Logic
const visitor = $input.first().json;
const existingLead = $('PostgreSQL').first()?.json;
if (existingLead) {
// Return visitor - update and potentially escalate
const isNewHighIntent =
visitor.page_url?.includes('pricing') &&
!existingLead.pages_viewed?.includes('pricing');
return [{
json: {
action: isNewHighIntent ? 'escalate' : 'update',
visitor,
existingLead
}
}];
} else {
// New visitor - create lead
return [{
json: {
action: 'create',
visitor
}
}];
}
This level of custom deduplication and escalation logic would require multiple Zapier steps and workarounds. In n8n, it’s a single Code node.
Workflow 6: Target Account Matching
For ABM programs, match identified visitors against your target account list:
Leadpipe Webhook
→ Google Sheets Lookup: Check company_name against target account list
→ IF match found:
→ Slack #abm-alerts with account details
→ CRM: Link visitor to target account
→ Update account engagement score
→ IF no match:
→ Standard routing (Workflow 2)
Code Node for Fuzzy Company Matching
Company names don’t always match exactly. “Acme Corporation” vs “Acme Corp” vs “ACME” requires fuzzy matching:
const visitor = $input.first().json;
const targetAccounts = $('Google Sheets').all().map(item => item.json);
const normalize = (name) =>
(name || '').toLowerCase()
.replace(/\b(inc|llc|ltd|corp|corporation|company|co)\b\.?/g, '')
.replace(/[^a-z0-9]/g, '')
.trim();
const visitorCompany = normalize(visitor.company_name);
const match = targetAccounts.find(account => {
const targetCompany = normalize(account.company_name);
return visitorCompany === targetCompany ||
visitorCompany.includes(targetCompany) ||
targetCompany.includes(visitorCompany);
});
return [{
json: {
...visitor,
is_target_account: !!match,
matched_account: match || null
}
}];
Error Handling and Monitoring
n8n’s error handling is significantly more capable than Zapier’s:
Error Workflow
Create a dedicated error workflow:
Error Trigger
→ Slack #n8n-errors: "Leadpipe workflow failed: {{error.message}}"
→ Log to error tracking (Sentry, Datadog, or a database)
→ IF critical: Send email to ops team
Retry Logic
Configure retry behavior on individual nodes:
- CRM nodes: Retry 3 times with 30-second delay (handles rate limits)
- Enrichment API nodes: Retry 2 times with 60-second delay
- Slack nodes: Retry 2 times with 10-second delay
Monitoring Dashboard
n8n’s execution log shows every workflow run with input/output data. Set up a monitoring routine:
- Check failed executions daily
- Monitor webhook response times
- Track CRM creation success rates
- Alert on consecutive failures
Workflow 7: Time-Based Follow-Up Scheduling
n8n’s Wait node enables time-based automation that’s difficult to replicate in Zapier:
Leadpipe Webhook
→ CRM Lead Created
→ Wait 24 hours
→ Check: Did the lead respond?
→ IF no response:
→ Send follow-up email via SendGrid/Mailgun
→ Wait 72 hours
→ Check again
→ IF still no response:
→ Create LinkedIn outreach task in CRM
Wait Node Configuration
Node: Wait
Settings:
- Resume: After time interval
- Amount: 24
- Unit: Hours
The Wait node pauses the workflow for a specified duration, then continues execution. This lets you build multi-step, time-delayed sequences entirely within n8n - no separate email sequence tool needed for simple follow-ups.
This approach works best for teams that want to keep their automation logic centralized in n8n rather than spreading it across multiple platforms.
Production Checklist
Before going live with your n8n + Leadpipe workflows:
- Webhook URL is stable. If self-hosting, ensure your n8n instance has a static URL (use a reverse proxy with SSL).
- Error workflow is active. Don’t run production workflows without error notifications.
- Deduplication is tested. Send the same test visitor twice and verify it doesn’t create duplicates.
- Rate limits are respected. If calling external APIs (Clay, CRM, Slack), add delays between requests for batch processing.
- Data backup. If self-hosting, ensure n8n’s data directory is backed up.
- Credentials are secure. Store API keys in n8n’s credential manager, not in workflow nodes.
- Filtering is working. Verify that personal emails and non-ICP visitors are filtered correctly.
Performance at Scale
n8n handles Leadpipe’s webhook volume comfortably:
| Monthly Identified Visitors | Webhook Frequency | n8n Resource Needs |
|---|---|---|
| 500-1,000 | 20-30/day | Minimal (1 CPU, 512MB RAM) |
| 1,000-5,000 | 30-150/day | Light (1 CPU, 1GB RAM) |
| 5,000-20,000 | 150-650/day | Moderate (2 CPU, 2GB RAM) |
| 20,000+ | 650+/day | Scale with queue workers |
For most Leadpipe customers, a basic n8n instance on a $5/month VPS handles the volume with room to spare.
Try Leadpipe free with 500 leads ->
Getting Started
- Set up n8n (5-10 minutes). Docker, npm, or n8n Cloud.
- Create a Webhook node and add the URL to Leadpipe.
- Build Workflow 1 (basic webhook to CRM). Test with a real visitor.
- Add intent routing (Workflow 2). Route by page viewed.
- Add enrichment (Workflow 3). Layer Clay or similar enrichment API.
- Set up error handling. Don’t skip this.
Start your free trial - 500 leads, no credit card required ->
Related Articles
- Leadpipe + Zapier: 10 Automation Recipes
- Webhook Payload Reference: Every Visitor Data Field
- Leadpipe API in 5 Minutes
- Build a Custom AI SDR with Leadpipe and OpenAI
- Leadpipe + Clay + HubSpot Integration Guide
- Visitor Identification API: Complete Developer Guide
- How to Feed Visitor Data into an AI Agent