Most B2B sales teams are bleeding pipeline without knowing it. The average business takes 47 hours to respond to a new lead, a HubSpot benchmark compiled alongside dozens of other response-time studies by GreetNow. Two full business days is enough time for a prospect to fill out three competitors' forms and forget yours exists. The leads are usually fine. The bottleneck is that humans cannot process form submissions, enrich company data, evaluate fit signals, and route to the right rep fast enough.
This is where an AI lead qualification agent changes things. It sits between your form submissions and your Slack, running every new lead through your ideal customer profile in seconds, then posting a scored summary to the channel where your sales team actually works. Claude does the reasoning. n8n handles the plumbing. The whole thing costs a few dollars a month.
We at Supernodes build these kinds of agent pipelines for mid-market and enterprise teams, and a lead qualification workflow is usually one of the quickest to pay for itself. If you have a website form and a Slack workspace, you can build this in an afternoon.
Why manual lead qualification is costing you more than you think
Sales development teams at B2B SaaS companies spend 40 to 60% of their time on lead research and qualification, according to SaaS SEO's 2026 analysis of SDR workflows. That is 40 to 60% of your most expensive sales headcount doing work that follows the same pattern for every lead: open the form submission, look up the company, check LinkedIn, guess whether they fit, copy everything into the CRM, ping someone on Slack. Repeat.
The wasted hours are only part of the cost. 67% of lost sales result from inadequate lead qualification, per Landbase's 2026 roundup of 35 qualification benchmarks, and 79% of marketing leads never convert to sales. Leads that could have converted just sit there, uncontacted, and the ones that do get a response wait nearly two full business days on average.
The fix is automating the qualification step so every lead gets scored within seconds of submitting a form, and the hot ones get routed to Slack while they are still on your website.
The architecture: Claude reasons, n8n routes, Slack notifies
Before we get into the build, a quick word on what n8n is and is not. n8n is a deterministic workflow engine. It routes data, triggers actions, connects APIs. It does not make decisions or evaluate leads on its own. That is Claude's job. Claude, called via the Anthropic API, receives the lead data, compares it against your ideal customer profile, assigns a qualification score with reasoning, and returns the result. n8n picks up that result and sends it where it needs to go.
Here is the flow: a lead submits your website form. That triggers an n8n webhook. n8n optionally enriches the lead with company data from HubSpot or a similar source, then sends everything to Claude. Claude scores the lead (0 to 100) and returns a structured JSON with the score, reasoning, and recommended next action. n8n checks the score. If it is above your threshold, say 80, n8n formats a rich Slack card and posts it to your sales channel. The whole thing runs in under 10 seconds.
Claude is the intelligence layer that evaluates whether a lead fits your ICP. n8n is the plumbing that connects that intelligence to the tools your team uses every day.
If you have worked with n8n workflow templates for ad optimisation before, the pattern will feel familiar. The same node-based logic that pulls Google Ads data into Slack every morning is what routes qualified leads to your sales team. Business sales and outreach automation, including exactly this kind of B2B lead qualification workflow, is one of the fastest-growing uses of the Claude API. Anthropic's Economic Index found that API traffic for this category at least doubled between November 2025 and February 2026.
Step 1: Set up the n8n webhook to capture inbound leads
Create the webhook trigger
Open n8n and create a new workflow. Add a Webhook node as the trigger. In the node settings, set the HTTP method to POST and leave the path as the default (or set something like /lead-qualification). Activate the workflow and n8n will generate a unique URL that looks like https://your-n8n-instance.com/webhook/lead-qualification.
This URL is what your website form sends data to. Most form tools (Typeform, HubSpot forms, Gravity Forms, even a plain HTML form with a POST action) can send to a webhook URL. Point your form's webhook destination to this URL, and every new submission will trigger the n8n workflow within seconds.
Test it: send a POST request with sample lead data using curl or Postman:
curl -X POST "https://your-n8n-instance/webhook/lead-qualification" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Chen","email":"[email protected]","company":"Acme Corp","job_title":"VP Marketing"}'
Check the n8n execution log to confirm the webhook received the data. You should see the JSON payload in the node's output.
Step 2: Configure the Claude API node for lead scoring
Connect n8n to the Anthropic API
Add an HTTP Request node after the Webhook node. This is how n8n talks to Claude. Configure it like this:
Method: POST
URL: https://api.anthropic.com/v1/messages
Headers:
{
"x-api-key": "sk-ant-...",
"anthropic-version": "2023-06-01",
"content-type": "application/json"
}
Your Anthropic API key lives in the Claude Developer Platform. New accounts get $5 in free credits, which covers several thousand lead qualifications before you pay anything.
In the Body section, switch to JSON and construct the Claude API call. The key fields are model, max_tokens, and messages. For lead scoring, Claude Sonnet 5.5 is the sweet spot. It is fast (2 to 5 seconds per response), accurate enough for firmographic evaluation, and costs roughly $0.003 to $0.01 per lead at Claude Sonnet 5.5's published rate of $2 per million input tokens and $10 per million output tokens.
Use n8n's expression syntax ({{ }}) to pull data from the webhook output into the Claude prompt. The webhook's JSON fields are available under $json.
Step 3: Build the qualification prompt that Claude uses to score leads
Write the ICP scoring prompt
This is the part that determines whether your lead qualification agent is useful or just a random number generator. The prompt needs three things: your ICP definition in precise language, the enriched lead data in structured format, and an explicit output format specification so Claude returns consistent, machine-readable JSON.
Here is the prompt template we use with clients. Replace the ICP criteria with yours:
You are a B2B lead qualification assistant. Score this lead 0-100 based on how well they match our ICP.
ICP CRITERIA:
- Company size: 50-500 employees (best fit)
- Industry: B2B SaaS, professional services, fintech (good fit). E-commerce, retail (fair). Consumer goods, non-profit (poor).
- Job title signals: VP/Director/Head of Marketing, Growth, Revenue Operations (strong). Manager level (moderate). Individual contributor (weak).
- Location: US, Canada, UK, Australia (strong). Other English-speaking (moderate).
- Signals: mentions "automation", "AI", "workflow" in form (bonus +10). Mentions "demo", "pricing", "implementation" (bonus +10).
Return ONLY valid JSON, no markdown, no explanation outside the JSON:
{
"score": 0-100,
"tier": "hot" (80+), "warm" (50-79), or "cold" (under 50),
"reasoning": "1-2 sentences explaining the score",
"next_action": "what the sales team should do",
"company_context": "brief company insight based on available data"
}
LEAD DATA:
Name: {{ $json.name }}
Email: {{ $json.email }}
Company: {{ $json.company }}
Job Title: {{ $json.job_title }}
{{#if $json.company_size}}Company Size: {{ $json.company_size }}{{/if}}
{{#if $json.industry}}Industry: {{ $json.industry }}{{/if}}
Form Message: {{ $json.message }}
A few things to call out here. First, the prompt asks Claude to return only JSON. This matters because n8n's next node will parse that JSON to decide what to do. If Claude wraps the JSON in markdown code fences, the parse fails. Second, the prompt uses n8n's Handlebars-style conditionals ({{#if}}) to handle optional fields. If the form captured company size, include it. If not, Claude scores based on what it has.
SaaS SEO's guide recommends providing 10 to 15 examples of qualified and disqualified leads as few-shot examples in the prompt. This improves scoring accuracy noticeably. We have found the same thing in our client work. The more specific your ICP criteria in the prompt, the closer Claude's scoring matches what your best SDRs would decide.
To parse the JSON response in n8n, add a Function node or an Item Lists node after the HTTP Request. The expression {{ JSON.parse($json.content[0].text) }} extracts the structured score, tier, reasoning, and next action into n8n fields that the routing logic can use.
Step 4: Route scored leads to Slack with summary cards
Build the routing and notification logic
Now that Claude has scored the lead, n8n needs to decide what to do with it. Add an IF node after the parsing step. Set the condition to check the score field:
Condition 1 (Hot): {{ $json.score }} >= 80
Condition 2 (Warm): {{ $json.score }} >= 50
For the Hot branch, add a Slack node. Connect it to the channel where your sales team lives (something like #hot-leads or #sales-inbound). Use Slack's Block Kit format for a rich summary card:
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🔥 Hot Lead (Score: {{ $json.score }}/100)",
"emoji": true
}
},
{
"type": "section",
"fields": [
{"type": "mrkdwn", "text": "*Name:*\n{{ $json.name }}"},
{"type": "mrkdwn", "text": "*Company:*\n{{ $json.company }}"},
{"type": "mrkdwn", "text": "*Title:*\n{{ $json.job_title }}"},
{"type": "mrkdwn", "text": "*Tier:*\n{{ $json.tier }}"}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Reasoning:* {{ $json.reasoning }}\n*Next action:* {{ $json.next_action }}"
}
},
{
"type": "divider"
}
]
}
For the Warm branch, you might send a quieter notification to a nurture channel or log the lead to a Google Sheet for weekly review. The Cold branch can just archive the data without notifying anyone. Landbase's research found that early disqualification saves 32% of sales time. Removing noise from your team's Slack is as valuable as surfacing the signal.
Response time matters enormously here. The InsideSales.com and MIT study on lead response, based on over 100,000 call attempts, found that leads contacted within 5 minutes are 21 times more likely to be qualified than leads contacted after 30 minutes. This pipeline posts to Slack within seconds of form submission. Your reps see the alert while the prospect is still on their phone.
Step 5: Add HubSpot enrichment for richer lead scoring
Pull company data before scoring
So far Claude is scoring based on whatever the form captured. For most B2B forms that is name, email, company, and maybe a message field. That is enough for a first pass, but adding company enrichment data improves accuracy significantly.
If you use HubSpot, n8n has a native HubSpot node. Insert it between the Webhook and the HTTP Request node. Configure it to look up the company by domain (extracted from the email address) and pull these properties:
industrynumberofemployeesannualrevenuehs_lead_status(existing lead status if already in CRM)
Pass those values into the Claude prompt under the LEAD DATA section. The more context Claude gets, the more nuanced the score. A VP Marketing at a 200-person B2B SaaS company is a fundamentally different prospect than the same title at a 2,000-person retail chain, and Claude can tell the difference if you give it the data.
If you are not on HubSpot, n8n connects to over 1,000 services including Salesforce, Pipedrive, and Google Sheets. The pattern is the same: pull company data, feed it to Claude, route based on the score.
Step 6: Test the full pipeline end to end
Validate the workflow before going live
Before connecting this to a live form, send a handful of test submissions through the webhook and verify each step:
- Webhook capture: Does the webhook receive the JSON and pass it to the next node? Check the execution log.
- Claude scoring: Send a lead that clearly fits your ICP and one that clearly does not. Do the scores make sense? Adjust the prompt if Claude is too generous or too strict.
- Routing logic: Does the hot lead land in Slack? Does the cold lead get archived without noise? Test each branch.
- Slack formatting: Open the Slack message on mobile. Is it readable? Block Kit formatting should render cleanly on both desktop and phone.
- Speed: How fast does the Slack message appear after you send the test webhook? If it is more than 15 seconds, check the Claude API response time in n8n's execution log.
Calibrate monthly. Review the conversion rates for each score tier. If leads scoring 70 to 80 are converting at the same rate as leads scoring 80+, your threshold is too high. If leads scoring 50 to 70 never convert, the threshold is about right. Adjust the prompt based on actual outcomes, not hunches.
For teams already running deep research agents, this pipeline fits naturally into a broader agent architecture. The lead qualification agent feeds its output into the same systems your research and content agents already use. Skills, tools, and memory all compound across agents built on the same stack. We cover the full architecture in our 10-layer AI agent stack guide.
What this costs to run, and the order to build it in
Here is the breakdown for a team processing 500 leads a month.
A qualification prompt with enrichment data runs about 1,500 input tokens and returns about 200 output tokens. On Claude Sonnet 5.5, at $2 per million input tokens and $10 per million output tokens, that is roughly $0.005 per lead. On Claude Haiku 5.5, at $0.10 and $0.50 per million tokens, the same prompt costs about $0.0003. Both are the rates published on Anthropic's pricing page in October 2026. Compare either number to a human SDR spending 5 to 10 minutes per lead at $25+ per hour, and the economics are not close.
| Line item | Cost at 500 leads/month |
|---|---|
| Claude API (Sonnet 5.5, $2 in / $10 out per million tokens) | ~$2.50, under $0.01 per lead |
| Claude API (Haiku 5.5, $0.10 in / $0.50 out per million tokens) | ~$0.13, about $0.0003 per lead |
| n8n, self-hosted community edition | $0 |
| n8n, cloud Starter plan (if you skip self-hosting) | 20 EUR/month billed annually, 2,500 executions |
Total monthly cost sits under $3 for the API calls on Sonnet 5.5, or about 13 cents on Haiku 5.5, plus whichever n8n option you pick. You can qualify 500 leads a month for less than the cost of a single lunch delivery, and the return shows up as pipeline your SDRs did not have to sift by hand.
Watch the execution count as volume grows. n8n's Starter plan includes 2,500 workflow executions a month, and one lead that runs through the whole pipeline in a single workflow uses one, so the plan covers roughly 2,500 leads. Pro, at 50 EUR a month billed annually, raises the ceiling to 10,000. Failed runs and manual re-runs count as well, which is why the execution log is the first place to look when the workflow starts skipping leads.
Build the core loop first, then layer on enrichment
Start with the webhook and three test leads. Do not try to build the full pipeline with HubSpot enrichment and Slack formatting in one session. Get the core loop working (webhook to Claude to Slack) and run it for a week. You will find things to tweak in the prompt and the routing logic that only show up with real data.
Once the core loop is stable, add enrichment, then add the warm lead nurture path, then connect the output to your CRM so every lead has a qualification score attached before a rep even opens the record. Each step is incremental and each one removes more busywork from your sales team's day.
The pipeline described here takes about two hours to build if you have used n8n before. A little longer if this is your first workflow. Either way, by the end of the day you will have a system that qualifies every lead within seconds of submission and routes the hot ones to Slack while they are still actively thinking about your product.
How an AI lead qualification agent compares with a voice agent and CRM scoring
Three designs compete for the same job in 2026, and each fails in a different way. This is the short version we use when a team asks which one to start with.
| Approach | What it does, and where it fits | Where it breaks |
|---|---|---|
| AI voice agent | Phones the lead and runs the qualification conversation live. Suits inbound call volume, after hours, and trades where the phone is the channel. | Ignores everything written in the form, and consent and recording rules add work before the first call. |
| CRM scoring | Points and rules that live inside the CRM and update as the lead behaves. Suits teams already running the CRM as the only source of truth. | Needs clean fields and a configured model, and nobody can explain why one lead scored 71 and another 78. |
| n8n plus Claude | Reads the form and the enrichment, scores against your ICP, routes to Slack and the CRM. Suits form, chat and demo-request leads where the ICP logic is specific to you. | Needs an owner for the prompt, and the scores drift if nobody re-checks them. |
Retell and Bolna sell voice agents that call and qualify. HubSpot, Salesforce and Microsoft's Sales Qualification Agent score inside the CRM. Choose by the channel your leads arrive on, not by the category. If leads land as form fills, a voice agent adds a phone call nobody asked for, and it never sees the details the prospect typed. If leads land as calls, scoring text that nobody wrote is guesswork. Microsoft now ships a Sales Qualification Agent inside Dynamics 365, which tells you how much demand there is for this job, and it also tells you the constraint: a packaged agent scores against the vendor's idea of a good lead until someone writes yours down.
If the handoff between marketing and sales is already the weak point, the routing rules matter more than the model does. We covered that in lead scoring in Salesforce versus GA4 and in routing leads between sales and marketing.
Making the scores hold up, month after month
A score nobody checks is a guess with a number attached. Two things keep it honest: the weighting you write down in the prompt, and an audit you run every month.
The scoring rubric behind the number
Most agent builds stop at a prompt that says score this lead from 0 to 100. That produces numbers nobody trusts, because the model invents the weights on every run and a rep cannot argue with a verdict they cannot see. Write the weights down, put them in the prompt, and the score becomes something a sales manager can challenge.
| Dimension | Weight, and what earns points | Where it goes wrong |
|---|---|---|
| Firmographic fit | 40 points. Employee count, industry and revenue band measured against the ICP definition. | Enrichment comes back empty for a small firm, so the lead lands in the middle of the range by default. |
| Role and authority | 25 points. Title level, function, and whether the person sits in the buying committee. | Unusual titles such as Head of Growth Operations get read as individual contributors. |
| Intent and timing | 20 points. Pricing or demo language, implementation questions, repeat visits from the same domain. | The form gives you one free-text field and most leads leave it blank. |
| Data quality | 15 points. Verifiable domain, company name present, consistent email pattern, phone captured. | Penalises real leads from businesses with no web footprint. |
| Total | 100 points. |
Those four weights are where we start for B2B SaaS and professional services. Change them when your own closed-won data disagrees. If your best accounts keep arriving from firms under 50 staff, the firmographic weight is set for a business you do not win, and the score will keep burying the accounts you do. Keep the weights in plain text inside the prompt so a rep can read why a lead scored 34. The same logic applies to a lead scoring model that keeps prospects warm, except the weights live in a prompt you can edit instead of a model builder only one person understands.
The false-negative audit, run monthly
The expensive failure is the quiet one. A lead the agent scored 34, which a rep would have called on Monday morning, leaves no trace: nothing was routed and nobody follows up on an absence. Run this audit monthly and treat it as part of the build.
- Pull 50 scored leads from the month, half above your threshold and half below.
- Hand them to the rep who owns that territory with the scores stripped out.
- Ask for one answer per lead: worth a call this week, or not.
- Compare the two lists. False negatives are the leads the rep wanted and the agent buried. Our working tolerance is one in ten. Above that, drop the cold threshold or add the missing pattern to the prompt.
- Write the prompt version and the threshold onto every record. An n8n Set node that saves
prompt_versionandthresholdto a CRM property means that when scores shift in March you can tell whether the prompt changed or the leads did.
The pattern that turns up most often in these audits is a field mismatch. A partner referral program that sends the company name inside the message field scores as an unknown company every time, so the rubric marks it down for missing data it never had. The fix is a Set node that parses the message before the Claude call, and the referrals then score like the good leads they were. Audit the input mapping before you touch the prompt, because a prompt cannot recover data that never arrived.
Frequently asked questions
How much does it cost to qualify leads with Claude?
Using Claude Sonnet 5.5, scoring a single lead costs roughly $0.003 to $0.01. That is $3 to $10 per thousand leads, so 500 leads a month comes to about $2.50. The n8n routing layer is free if you self-host, and n8n's cloud Starter plan is 20 EUR per month billed annually if you do not.
Can n8n build an AI agent that qualifies leads?
n8n is a workflow automation engine. It routes data, triggers actions, and connects APIs based on rules you define. The AI reasoning, the part that actually evaluates whether a lead fits your ICP, happens in Claude via its API. n8n is the plumbing that connects Claude's output to your Slack and CRM. If you want to understand how these layers fit together, start with our guide to the 10-layer AI agent stack.
What data does Claude need to score a lead accurately?
At minimum, Claude can work with what is in the form submission: name, email, company name, and job title. Adding company enrichment data (industry, employee count, recent funding, technology stack) improves accuracy significantly. The more context you give Claude, the better the qualification.
Do I need to write code for this workflow?
No. The entire pipeline is built with n8n's visual editor. You configure nodes for the webhook, HTTP request to Claude, Slack message, and routing logic. No JavaScript or Python needed, though the Claude API call requires copying your Anthropic API key into n8n's credential store. The prompt template above is copy-paste ready.
How fast does the lead qualification run?
The full pipeline, from webhook trigger to Slack notification, executes in under 10 seconds. Claude's API response typically takes 2 to 5 seconds. Compare that to the average B2B response time of 47 hours, and the difference in lead engagement is dramatic.
Can I use ChatGPT instead of Claude?
Yes. Swap the HTTP Request node's URL to the OpenAI API endpoint and adjust the prompt format slightly. The workflow pattern is identical. The n8n routing logic and Slack integration stay the same regardless of which AI model scores your leads. The same prompt template works with minimal changes.
What is an AI lead qualification agent?
An AI lead qualification agent reads a new lead, compares it with your ideal customer profile and decides whether it deserves a rep's time. In this build Claude does the reading and the scoring from 0 to 100, and n8n carries the result to Slack and your CRM. It replaces the first five minutes of sales review, not the rep.
How is an AI lead qualification agent different from a voice agent?
A voice agent phones the lead and runs the qualification conversation out loud. An agent built on form and CRM data scores the lead without a call, then routes it to a person. Voice agents suit businesses that sell on the phone. Scored routing suits teams whose leads arrive as form fills, demo requests and inbound chat.
How accurate are AI lead qualification scores?
Accuracy comes from the rubric, not the model. Four weighted criteria plus 10 to 15 labelled examples track an experienced rep closely enough to triage. We check scores monthly by sampling 50 scored leads and asking the owning rep to mark each one worth a call or not. More than one false negative in ten means the threshold or the prompt needs work.