How to Automate Lead Generation with n8n: Capture, Qualify, and Convert on Autopilot
If you are running a startup or agency, you already know the pain. Leads come in from a dozen different sources, they sit in a spreadsheet for days, nobody follows up on time, and by the time someone does, the prospect has moved on. I have been there myself.
As a startup consultant based in Chile, I work with teams that are constantly stretched thin. Sales, marketing, operations — everyone is wearing multiple hats. The last thing anyone has bandwidth for is manually copying lead data from a form into a CRM, looking up the company on LinkedIn, sending a welcome email, and pinging the sales team on Slack. But all of those steps matter. Skip any one of them and you lose deals.
That is exactly why I built an automated lead generation pipeline with n8n. It runs 24/7, captures every lead the moment they come in, enriches their data, scores them, routes them into my CRM, kicks off an email nurture sequence, and notifies my team on Slack — all without anyone lifting a finger.
In this guide, I will walk you through every piece of this system so you can build your own.
Why n8n Is Perfect for Lead Generation Automation
Before I get into the build, let me explain why I chose n8n over alternatives like Zapier, Make, or custom scripts.
First, n8n is open source. You can self-host it on your own server, which means no per-task pricing that spirals out of control when you scale. When you are processing hundreds or thousands of leads per month, this matters enormously.
Second, n8n gives you a visual workflow builder that makes complex multi-step automations easy to understand and modify. I am a technical person, but I also need my non-technical teammates to understand what the system does. The visual canvas makes that possible.
Third, n8n has native integrations with virtually every tool in the modern sales and marketing stack: HubSpot, Salesforce, Google Sheets, Slack, Gmail, Mailchimp, Airtable, and hundreds more. And when a native integration does not exist, you can hit any API with the HTTP Request node.
Finally, n8n supports branching logic, error handling, and sub-workflows. Lead generation is not a simple A-to-B pipe. You need conditional routing based on lead quality, fallback paths when an enrichment API returns no data, and retry logic for flaky external services. n8n handles all of this natively.
The Complete Lead Generation Pipeline: Overview
Here is the full pipeline I built, broken down into five stages:
1. Lead Capture — Collect leads from forms, landing pages, chatbots, or API webhooks
2. Data Enrichment — Automatically look up company info, social profiles, and firmographics
3. Lead Scoring and Qualification — Assign a score based on criteria you define
4. CRM Entry and Routing — Push qualified leads into your CRM and assign them to the right rep
5. Nurture Sequence and Notifications — Trigger an email drip campaign and alert your team on Slack
Let me walk through each stage in detail.
Stage 1: Lead Capture
The pipeline starts with a Webhook node in n8n. This is the entry point that receives lead data from your forms, landing pages, or any external system.
I set up the Webhook node with the POST method enabled and a custom path like “new-lead.” This gives me a URL that I can plug into any form builder — Typeform, Tally, Webflow, WordPress Contact Form 7, or even a custom HTML form.
When someone fills out the form, the data hits my n8n webhook and the workflow fires immediately. The incoming payload typically includes fields like name, email, company, phone number, and whatever custom fields you added to the form.
For redundancy, I also set up additional trigger nodes that listen for new rows in a Google Sheet (for leads that come in through integrations that dump into sheets) and for new contacts in my Mailchimp audience (for leads that subscribe via embedded forms).
All three entry points feed into a single Merge node that normalizes the data into a consistent format before passing it downstream. This way, no matter where the lead originated, the rest of the pipeline works identically.
Pro tip: add a Remove Duplicates node right after the merge. I use a Function node that checks the incoming email against a list of recently processed emails stored in a simple Redis cache. This prevents the same lead from being processed twice if they submit a form multiple times.
Stage 2: Data Enrichment
Raw form data is rarely enough to qualify a lead. You need context: What company do they work at? How big is the company? What industry? Do they have budget authority?
I use an HTTP Request node to call the Clearbit Enrichment API (or Hunter.io, or Apollo — use whatever enrichment service you prefer). I pass the lead’s email address, and the API returns a wealth of data: company name, size, industry, location, LinkedIn profile, job title, and more.
The workflow takes the enrichment response and uses a Set node to map the relevant fields onto the lead record. If the enrichment API returns no data (which happens with personal email addresses like Gmail or Hotmail), I have a conditional branch that flags the lead as “unresolved” and routes it to a manual review queue in Airtable.
For leads with business emails that enrich successfully, I also pull their company’s LinkedIn page using the LinkedIn API (via another HTTP Request node) to grab the latest employee count and any recent company news. This context helps the sales team personalize their outreach.
Stage 3: Lead Scoring and Qualification
Not every lead deserves the same level of attention. A VP at a 500-person SaaS company is a very different prospect than a student doing research for a class project. Lead scoring lets you prioritize automatically.
I built a scoring system using a Function node that evaluates the enriched lead data against a set of weighted criteria. Here is how I structured the scoring:
– Job title contains “VP,” “Director,” “Head of,” or “C-level” — add 30 points
– Company size is greater than 50 employees — add 20 points
– Company size is greater than 200 employees — add an additional 15 points
– Industry matches your Ideal Customer Profile (ICP) — add 25 points
– Lead filled out optional fields like phone number or budget range — add 10 points each
– Email domain is a business domain (not Gmail, Yahoo, etc.) — add 15 points
The Function node calculates the total score and assigns a grade: A (80+), B (50-79), C (20-49), or D (below 20).
An IF node then branches the workflow based on the grade:
– Grade A leads go straight to the CRM as “hot leads” and trigger an immediate Slack notification to the assigned sales rep
– Grade B leads go to the CRM as “warm leads” and enter the standard email nurture sequence
– Grade C leads enter a longer-term nurture sequence with educational content
– Grade D leads are stored in a separate sheet for review but do not enter any active sequence
This scoring system has saved my clients hundreds of hours of wasted follow-up on unqualified leads.
Getting Started with n8n
If you do not have n8n set up yet, the fastest way to get started is with the cloud version. You can try n8n here — it takes less than two minutes to create an account and start building your first workflow. The cloud version handles hosting, updates, and SSL certificates so you can focus on building automations instead of managing infrastructure.
Stage 4: CRM Entry and Routing
Once a lead is scored, the next step is pushing it into your CRM. I use HubSpot, but this works identically with Salesforce, Pipedrive, Close, or any CRM that n8n integrates with.
The HubSpot node in n8n creates a new contact with all the enriched data mapped to the appropriate CRM fields: first name, last name, email, company, job title, lead score, lead source, and any custom properties you have set up.
For lead routing, I added logic that assigns leads to specific sales reps based on geography and deal size. A Switch node checks the lead’s country (from the enrichment data) and routes accordingly. Leads from Latin America go to me, leads from North America go to another rep, and so on. Within each region, leads above a certain score threshold go to senior reps, while lower-scored leads go to SDRs for further qualification.
The workflow also creates a deal in the CRM pipeline associated with the contact, sets the deal stage to “New Lead,” and populates the estimated deal value based on the company size tier.
I also add a note to the CRM contact record with a summary of the enrichment data and the lead score breakdown, so the sales rep has full context when they open the record.
Stage 5: Email Nurture Sequence
Automated follow-up is where most lead gen systems fall apart. People build the capture and CRM parts but then rely on manual email outreach. That is a bottleneck that kills conversion rates.
I set up an email nurture sequence directly in n8n using a combination of the Wait node and the Gmail node (you could also use SendGrid, Mailchimp, or any email service).
Here is the sequence I built for Grade B leads:
– Immediately after CRM entry: Send a personalized welcome email acknowledging their form submission and providing a relevant resource (case study, guide, or video)
– Wait 2 days: Send a second email with a deeper dive into how your product or service solves their specific problem (personalized based on their industry from the enrichment data)
– Wait 3 days: Send a third email with social proof — customer testimonials, case studies, or metrics
– Wait 4 days: Send a final email with a clear call to action to book a demo or schedule a call
Each email is sent through the Gmail node (or your preferred email service), with the subject and body personalized using data from the lead record. I use the Set node to build the email cont