How to Use n8n with ._Template 105 Qualificacao Enriquecimento Leads Ia
Your sales team is drowning in raw leads. A form fill lands, a name and email drop into a spreadsheet, and then nothing happens for hours — sometimes days. By the time a rep looks at the lead, the buy
Your sales team is drowning in raw leads. A form fill lands, a name and email drop into a spreadsheet, and then nothing happens for hours — sometimes days. By the time a rep looks at the lead, the buying intent has cooled and half the "leads" turn out to be students, competitors, or free-email tire-kickers who were never going to buy. The cost isn't just wasted rep time; it's the qualified buyer sitting three rows down who never got a timely reply because the queue was clogged with noise.
The Problem: Manual Qualification Doesn't Scale
Lead qualification is the classic bottleneck that gets worse exactly when things are going well. When volume is low, a founder eyeballs each lead and it works fine. When a campaign hits and 200 leads arrive in a day, manual triage collapses. Reps either work leads in arrival order (ignoring fit) or spend their morning Googling company names, checking LinkedIn, and guessing at company size before deciding who to call.
The data problem underneath this is that inbound forms capture the minimum — usually email and maybe a name. That's not enough to qualify. You need the company, the industry, headcount, the tech stack, and a fit score before you can route intelligently. Enriching and scoring that by hand is repetitive, judgment-heavy work: the exact profile of a task you should automate.
The Solution: An AI Enrichment and Qualification Pipeline in n8n
Template 105 wires together a pipeline that takes a bare lead, enriches it from the email domain and public data, scores it with an LLM against your ideal customer profile (ICP), and routes it — hot leads to Slack and your CRM, cold leads to a nurture list. The whole flow runs in seconds per lead, unattended, 24/7.
The architecture is deliberately simple: a trigger receives the lead, an HTTP enrichment step pulls company data, an AI node reasons about fit and returns structured JSON, and a switch routes based on the score. Because n8n handles the plumbing (retries, rate limits, credential storage), you focus only on the qualification logic that's specific to your business.
Step-by-Step Setup in n8n
1. Capture the lead with a Webhook node. Add a Webhook node set to POST and point your form provider (Typeform, Gumroad, a landing page) at the generated URL. In production, switch the node from Test to Production URL and copy it into your form's webhook settings. The incoming JSON lands in {{ $json.body }}.
2. Normalize and extract the domain. Drop in a Set (Edit Fields) node to standardize field names — email, name, message. Add a Code node to derive the company domain from the email: split on @ and drop free providers. A quick guard here saves enrichment credits:
const domain = $json.email.split('@')[1];
const free = ['gmail.com','yahoo.com','outlook.com','hotmail.com'];
return [{ json: { ...$json, domain, isBusiness: !free.includes(domain) } }];
3. Enrich from the domain. Use an HTTP Request node to call an enrichment API (Clearbit, Apollo, or a free source like the company's own metadata). Configure it with a stored credential rather than a hardcoded key, set the method and query params, and enable Retry On Fail with 3 attempts and a 2-second wait to survive transient rate limits. Map the response into fields like company, industry, employeeCount, and country.
4. Score with an AI node. Add an AI Agent or Basic LLM Chain node backed by an Anthropic Chat Model (Claude Opus 4.8 or Haiku 4.5 for cheaper, faster scoring). Feed it the enriched profile and your ICP definition in the system prompt, and force structured output so downstream nodes can rely on it. Prompt it to return exactly:
{ "score": 0-100, "tier": "hot|warm|cold", "reason": "one sentence", "suggested_next_step": "..." }
Attach a Structured Output Parser to guarantee valid JSON. In the system prompt, be concrete about your ICP — for example: "Score higher for B2B SaaS and agencies with 10–500 employees who mention automation, integration, or manual workflows. Score lower for students, job seekers, and free-email personal accounts." The model does the fuzzy judgment a rep would otherwise do manually.
5. Route on the result. Add a Switch node keyed on {{ $json.tier }}. Send the hot branch to a Slack node (post to #sales with the score, reason, and next step) and to an HTTP Request or native CRM node that creates the contact in HubSpot or Pipedrive. Route warm to a nurture sequence and cold to a low-priority list or a simple Google Sheets append for later review. Nothing gets dropped; everything gets a destination.
Benefits You'll See Immediately
Speed to lead. Hot leads hit your reps' Slack within seconds of the form submission, while intent is at its peak. Studies consistently show responding in the first five minutes dramatically outperforms responding in an hour.
Rep focus. Your team works a pre-scored, pre-enriched queue instead of a raw dump. They open a lead already knowing the company, size, and why it fits — the Googling is done.
Consistency. The same ICP logic is applied to every single lead, at 2 a.m. and during a launch spike alike. No mood, no fatigue, no arrival-order bias.
Auditability. Every scoring decision includes a one-sentence reason, so when a rep disagrees you can see the model's logic and refine the prompt — turning qualification into something you actively tune rather than guess at.
Common Pitfalls and How to Avoid Them
Trusting unstructured AI output. If you skip the Structured Output Parser, one malformed response breaks your Switch node. Always force JSON and add an error branch that defaults unparseable leads to "warm" for manual review rather than losing them.
Burning enrichment credits on junk. Enrich after the free-email filter, not before. Sending every Gmail signup to a paid enrichment API wastes money on leads you'll likely deprioritize anyway. Gate the HTTP Request behind the isBusiness check with an IF node.
No rate-limit handling. Enrichment and LLM APIs throttle. Without Retry On Fail and a small wait, a burst of leads produces a burst of failures. Configure retries on every external node, and consider a Loop Over Items node with batching if you replay large backlogs.
A vague ICP prompt. "Score good leads higher" produces mush. The model is only as sharp as your definition. Give it explicit positive and negative signals, real examples, and a scoring scale. Revisit the prompt monthly as you learn which "hot" leads actually closed.
Testing only with the Test URL. The Webhook node behaves differently in test versus production mode. Before you rely on it, flip to the Production URL, submit a real form, and confirm the full chain fires — enrichment, scoring, routing, and CRM write — end to end.
No dead-letter path. Add a final catch branch (or an n8n Error Trigger workflow) that logs any lead the pipeline couldn't process to a sheet and pings you. Silent failures are how a "working" automation quietly loses a week of leads.
Set up once, this pipeline turns a chaotic inbox of raw form fills into a ranked, enriched, routed queue that works while you sleep — and it frees your team to do the one thing automation can't: actually sell.