Lead Generation on Autopilot: Converting Leads in 60 Seconds (Part 2)

· Manuel · 40 min read · Automation

If you’ve been in sales or marketing for more than five minutes, you know the golden rule: Time Kills All Deals.

According to a seminal study by Harvard Business Review, companies that try to contact potential customers within an hour of receiving a query are nearly 7 times more likely to have a meaningful conversation with a key decision-maker than those who try to contact them even one hour later.

But let's be real. Even one hour is too slow in 2025. If you call within 60 seconds, your conversion rate increases by 391%.

Why? Because when a lead fills out a form, they are thinking about their problem right now. Ten minutes later, they are on a competitor’s site. Thirty minutes later, they are eating lunch. An hour later, they have forgotten who you are.

In Part 1 of this series, we covered the basics of n8n. Today, we are going to build a production-grade Lead Generation Autopilot. This isn't a simple "Form -> Email" script. This is a sophisticated system that: 1. Ingests leads from any source (Facebook, LinkedIn, Webforms). 2. Standardizes messy data (formatting phone numbers). 3. Enriches the lead with company data (Clearbit/PeopleDataLabs). 4. Filters & Qualifies the lead based on potential value. 5. Routes high-value leads to a phone call instantly, and low-value leads to an email nurture sequence.

Let's build the engine that will scale your revenue without scaling your headcount.

Related Reading

The Architecture: Designing the Machine

Before we drop a single node, we need to map out the logic. Complexity is the enemy of execution, so we break our system down into five distinct phases.

Phase 1: Ingestion (The Funnel Top)

We need a single point of entry. Whether leads come from Facebook Ads, a Tally form on your site, or a Typeform quiz, they all need to enter the system through a unified Webhook.

Phase 2: Sanitation (The Janitor)

Users enter data poorly. They use lowercase names ("john doe"), unformatted numbers ("5551234567"), and personal emails for business inquiries. Our system must clean this up before it pollutes our CRM.

Phase 3: Enrichment (The Detective)

A user gives you their email. That's one data point. Using an enrichment API, that one data point becomes fifty: Company Size, Revenue, Job Title, LinkedIn URL, Technology Stack. This allows us to score leads accurately.

Phase 4: Scoring & Routing (The Brain)

This is the core logic.
  • Is this a student or a CEO?
  • Is their budget $500 or $50,000?
  • Are they in our service territory?
We use "Switch" nodes to create different paths for these different avatars.

Phase 5: Action (The Closer)

  • High Ticket: Trigger a VoIP call to the sales team immediately via Twilio/Zenduty.
  • Low Ticket: Add to a Mailchimp/ActiveCampaign nurture sequence.
  • Trash: Log to a "Rejected" sheet and ignore.

Step 1: The Unified Webhook

Let's start building. Open n8n and create a new workflow.

1. Add a Webhook Node. 2. Set the HTTP Method to `POST`. 3. Set the Path to `lead-intake-v1`. - URL: `https://n8n.your-domain.com/webhook/lead-intake-v1`

Why POST? GET requests puts data in the URL bar (insecure). POST puts data in the body (secure and handles larger payloads).

The Payload: Imagine your form sends this JSON: ```json { "full_name": "manuel medina", "email": "manuel@gsd.com", "phone": "305-555-0100", "company": "GSD BPO", "budget": "5000" } ``` Pin this data in the Webhook node so we can use it for development.

Step 2: Data Sanitation (Code Node)

Data from the wild is messy. We need to normalize it. Add a Code Node (JavaScript). This is cleaner than using 5 different "Edit Fields" nodes.

```javascript const input = items[0].json;

// 1. Capitalize Name const name = input.full_name .toLowerCase() .split(' ') .map(word => word.charAt(0).toUpperCase() + word.slice(1)) .join(' ');

// 2. Format Phone (Remove spaces, dashes) const phone = input.phone.replace(/[^0-9]/g, '');

// 3. Normalize Budget (to Number) const budget = Number(input.budget.replace(/[^0-9.]/g, ''));

return { json: { ...input, clean_name: name, clean_phone: phone, clean_budget: budget, timestamp: new Date().toISOString() } }; ``` Now, downstream nodes will use `clean_name` instead of the raw input. This ensures our CRM data is pristine.

Step 3: Enrichment (The Secret Weapon)

This step separates the amateurs from the pros. Most companies just take the form data at face value. We represent the top 1% who dig deeper.

We will use Clearbit (or Apollo/PeopleDataLabs) to find out who this person actually is. Add an HTTP Request node.

  • Method: GET
  • URL: `https://person.clearbit.com/v2/combined/find?email={{ $json.email }}`
  • Authentication: Header Auth (Bearer Token).

The Output: Clearbit returns a massive JSON object.

  • `person.employment.title`: "CEO"
  • `company.metrics.raised`: 10000000
  • `company.tech`: ["Salesforce", "AWS", "n8n"]

Now we know that "Manuel" isn't just a random lead; he's the CEO of a venture-backed company using Salesforce. His lead score just skyrocketed.

Step 4: The Logic Switch

Now we route the traffic. Add a Switch node. We are going to define our "Qualified Lead" criteria.

Rule 1: The Whale (High Priority)

  • Condition: `clean_budget` > 3000
  • AND
  • Condition: `company.metrics.raised` > 1000000 (from Clearbit)

Rule 2: The Standard Lead

  • Condition: `clean_budget` > 1000

Rule 3: The Tire Kicker

  • Condition: Everything else (Default).

The Switch node will now split the execution path into three separate branches. Visualizing this on the canvas is incredibly satisfying. You can see the traffic flow separation.

Step 5: Error Handling (The Safety Net)

What if the Clearbit API times out? What if HubSpot is down? In a naive script, the execution crashes and the lead is lost used forever. In n8n, we build resilience.

On your critical nodes (like the CRM Create node), go to Settings -> Error Handling.

  • On Error: "Continue"
  • Output: "Error Branch"

Connect the Error output to a fallback node: Google Sheets (Append Row): "Failed Leads Backup". Even if the entire internet burns down, you save the lead's name and phone number to a spreadsheet so you can call them manually later. Zero data loss is the standard.

Conclusion

You have now built a system that outperforms 90% of sales teams.

  • It responds instantly.
  • It knows more about the lead than the lead told you.
  • It prioritizes your team's attention on the highest value.

In Part 3, we are going to get even more advanced. We are going to build an AI Agent that doesn't just route leads, but actually talks to them. We will integrate OpenAI to draft personalized emails and even negotiate meeting times.

Stay tuned.

Related articles