Most B2B sales teams are bleeding pipeline without knowing it. The average business takes 47 hours to respond to a new lead, according to research compiled by GreetNow from Harvard Business Review and MIT data. And 80% of leads go cold before anyone on your team qualifies them, reports Orbilon Technologies' analysis of B2B sales workflows. Not because the leads are bad. Because humans simply cannot process form submissions, enrich company data, evaluate fit signals, and route to the right rep fast enough.
This is where an AI marketing agent built on Claude changes things. Not a chatbot that answers questions on your website. A system that 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 less than a bad lunch per month.
We at Supernodes build these kinds of agent pipelines for mid-market and enterprise teams, and the one we are walking through here is the fastest ROI project most teams take on. 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.
And the cost is not just in wasted hours. 67% of lost sales result from inadequate lead qualification, per Landbase's 2026 roundup of 35 qualification benchmarks. Leads that could have converted just sit there, uncontacted. Only 27% of leads ever get reached at all. The ones that do get a response, on average, wait nearly two full business days.
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. N8n's community has grown to over 196,000 members sharing more than 10,700 workflow templates. The Claude integration is one of the fastest-growing, according to Anthropic's Economic Index, which found that automated business workflows on the Claude API doubled in frequency between late 2025 and early 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 at console.anthropic.com. 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 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 the introductory rate of $2 per million input tokens and $10 per million output tokens through August 2026.
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. Research from MIT and published in Harvard Business Review shows that leads contacted within 5 minutes are 21 times more likely to be qualified than leads contacted after 30 minutes. And properly qualified leads convert at 40% versus 11% for unqualified prospects, according to Landbase's 2026 data. 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
Here is the breakdown for a team processing 500 leads a month.
Claude API (via Anthropic): At the Sonnet 5 introductory rate of $2 per million input tokens and $10 per million output tokens, a typical lead qualification prompt with enrichment data uses about 1,500 input tokens and returns 200 output tokens. That is roughly $0.005 per lead. At 500 leads per month: $2.50. Even after the introductory period ends and rates move to $3/$15 per million in September 2026, the per-lead cost stays under $0.01. Compare that to a human SDR spending 5 to 10 minutes per lead at $25+ per hour, and the economics are not close.
n8n: The self-hosted community edition is free and handles a few workflows running a few times per day without issue. If you prefer the cloud version, plans start at $20 per month.
Total monthly cost: Under $5 for the API calls, plus your n8n setup (free self-hosted or $20 cloud). You can qualify 500 leads per month for less than the cost of a single lunch delivery.
Businesses using AI for lead generation report a 50% increase in sales-ready leads and up to 60% lower customer acquisition costs, according to Martal Group's 2026 lead generation benchmarks. AI improves qualification accuracy by 40% over manual scoring, per Landbase. The return on a $5 monthly investment is measured in pipeline, not percentages.
What you should do next
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.
Frequently asked questions
How much does it cost to qualify leads with Claude?
Using Claude Sonnet 5, scoring a single lead costs roughly $0.003 to $0.01. That is $3 to $10 per thousand leads. n8n's free self-hosted tier handles the routing. Total monthly cost for a team processing 500 leads per month: under $15 including the n8n cloud plan if you choose not to self-host.
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. We have found that adding even two enrichment fields reduces false positives by roughly a third.
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. The five-minute window where lead qualification odds are highest is not just hit, it is obliterated.
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.