How to Automate AI Lead Qualifier — Score + Enrich Every Lead Automatically with n8n

Your SDR opens the CRM Monday morning to 47 new leads from the weekend. Half are students on free Gmail addresses. Three are enterprise buyers ready to sign. By the time anyone figures out which is wh

How to Automate AI Lead Qualifier — Score + Enrich Every Lead Automatically with n8n

Your SDR opens the CRM Monday morning to 47 new leads from the weekend. Half are students on free Gmail addresses. Three are enterprise buyers ready to sign. By the time anyone figures out which is which, the enterprise buyers have booked a demo with your competitor. Speed-to-lead is the single strongest predictor of conversion in B2B — reps who respond in under five minutes are up to 100x more likely to connect than those who wait an hour — and manual triage guarantees you lose that window every single day.

This article shows you how to build an AI lead qualifier in n8n that enriches every inbound lead with company data, scores it against your Ideal Customer Profile with GPT-4o, and routes hot leads to a rep in seconds — fully automated, no human triage, no lead sitting in a queue.

The real problem: triage is a tax on your best reps

Manual lead qualification fails for three structural reasons, not because your team is lazy.

It's slow. A human has to open the lead, Google the company, guess at headcount and industry, cross-reference your ICP, then decide. That's three to five minutes per lead when done well — and it's never done well at 47 leads a day.

It's inconsistent. Two reps score the same lead differently. One weighs job title, another weighs company size. You have no repeatable definition of "qualified," so your pipeline data is noise.

It's expensive. Your highest-paid closers spend their morning doing data entry and Googling instead of talking to buyers. Every minute spent qualifying a tire-kicker is a minute stolen from a real deal.

The fix isn't hiring an SDR to triage faster. It's removing the triage step entirely by letting a workflow enrich and score before a human ever sees the lead.

The solution: enrich, then score against your ICP

The workflow does two things a spreadsheet can't. First, enrichment: it takes the one thing every form gives you — an email address — and turns it into a full company profile (industry, headcount, revenue band, tech stack, location). Second, scoring: it feeds that enriched profile plus the lead's own details into GPT-4o with your ICP baked into the prompt, and gets back a 0–100 score with a written rationale.

The result: every lead that lands is already labeled hot, warm, or cold before a rep touches it. Hot leads get pushed to Slack and the top of the CRM in seconds. Cold leads drop into a nurture sequence automatically. Nobody spends a morning Googling company names again.

Step-by-step: building it in n8n

Here's the node-by-node structure. The whole thing is a linear flow with one branch at the end.

1. Trigger — capture the lead. Use a Webhook node set to POST if your form posts JSON (Typeform, Tally, a custom landing page), or a native trigger like HubSpot Trigger / Gmail Trigger if leads arrive there. Point your form's webhook URL at the n8n production URL. Test with a real submission so you can see the exact JSON shape in the node output.

2. Enrichment — turn the email into a company. Add an HTTP Request node calling an enrichment API (Clearbit, Apollo, or People Data Labs all work). Set method to GET, pass the email as a query parameter, and store the API key in n8n Credentials — never hardcode it in the URL. In the node, map the incoming {{ $json.body.email }} to the request. On the response, you'll get back company.name, company.employees, company.industry, and similar fields.

3. Normalize — clean the data before the AI sees it. Drop in a Set (Edit Fields) node to build a tidy object: full_name, email, company_name, employee_count, industry, job_title. This keeps your AI prompt short and cheap, and prevents malformed enrichment responses from confusing the model.

4. Score — GPT-4o against your ICP. Use the OpenAI node (Message a Model) or a Basic LLM Chain node with an OpenAI Chat Model set to gpt-4o. The system prompt carries your ICP explicitly. Something like:

"You are a lead qualification engine. Our ICP is B2B SaaS and agencies, 10–200 employees, in North America or Europe, where the contact holds a founder, ops, marketing, or RevOps title. Score this lead 0–100 for fit. Return strict JSON: {\"score\": number, \"tier\": \"hot|warm|cold\", \"reason\": \"one sentence\"}. Hot = 70+, warm = 40–69, cold = below 40."

Set temperature to 0.2 so scores are stable and repeatable, and enable JSON response format so the output parses cleanly. Pass the normalized lead fields in the user message.

5. Parse — get structured data back. Add a Structured Output Parser (or a JSON Code node) so downstream nodes receive real fields — {{ $json.score }}, {{ $json.tier }} — instead of a raw string.

6. Route — branch on tier. Use a Switch node on {{ $json.tier }}. On the hot branch, fire a Slack node to your #sales channel ("🔥 Hot lead: {{ $json.company_name }} — {{ $json.reason }}") and an HubSpot/Pipedrive node to create the contact with the score written to a custom field. On the warm and cold branches, push into your CRM tagged for the appropriate nurture sequence. Every lead lands somewhere; none get dropped.

What you actually get out of it

Speed-to-lead measured in seconds. A form submission triggers a Slack ping to your closer before the buyer has closed the confirmation tab. That's the window where deals are won.

Consistent, auditable scoring. Every lead is judged against the same ICP by the same model at the same temperature. The written rationale means you can spot-check the model's reasoning and tune the prompt when it drifts — you have a definition of "qualified" that doesn't change with whoever's on shift.

Reps focus on closing. No morning triage, no Googling company names. Your team wakes up to a Slack channel of pre-qualified hot leads and a CRM where the cold traffic has already been filed away.

It scales to zero marginal cost. Whether you get 5 leads a day or 500, the workflow runs the same. GPT-4o scoring costs a fraction of a cent per lead — orders of magnitude cheaper than a human minute.

Common pitfalls (and how to avoid them)

Vague ICP prompts produce garbage scores. "Score this good lead" gives you noise. Be specific about headcount ranges, industries, geographies, and titles. Include one or two examples of a 90 and a 20 in the system prompt if the model is being generous — few-shot examples tighten scoring dramatically.

No error branch on enrichment. Enrichment APIs return nothing for personal Gmail addresses and rate-limit under load. Add a Continue On Fail setting to the HTTP Request node and an IF node that routes un-enriched leads to a "manual review" tag instead of feeding empty fields to GPT-4o, which will then hallucinate a company.

Trusting the model to return valid JSON without enforcing it. Without the response-format setting or a parser, GPT-4o will occasionally wrap its answer in prose and break your Switch node. Always enable JSON mode and always parse. Add a fallback in the parser so a malformed response routes to warm rather than crashing the run.

Skipping deduplication. The same buyer fills out two forms and you ping your rep twice. Add a lookup against your CRM (a HubSpot: Get Contact node) early in the flow and short-circuit duplicates before scoring.

Not logging scores over time. Append every scored lead to a Google Sheets or database node. After a few hundred leads you'll see whether your "hot" threshold actually correlates with closed deals — and you can retune the ICP prompt with real evidence instead of a guess.

Build it once and it runs forever. Every lead enriched, scored, and routed the moment it arrives — while your reps do the one thing a workflow can't: close.

AI Lead Qualifier — Score + Enrich Every Lead Automatically
PRONTO PARA USAR

Ja construimos isso pra voce

Nao comece do zero. O AI Lead Qualifier — Score + Enrich Every Lead Automatically e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.

Instalar por $79.0 →