Automated lead qualification with n8n and Claude: scoring inbound inquiries, filtering hot leads, and routing to CRM
A practical n8n workflow for qualifying inbound leads automatically. Claude scores inquiry quality, filters warm from cold, and routes hot leads directly to your CRM — with a human review step for edge cases.
Manual lead qualification is the first automation opportunity most sales teams ignore. They track leads in a CRM, they review each one when capacity allows, and they respond to whoever emailed most recently rather than whoever is most qualified. The qualified lead from three days ago waits while the tire-kicker from this morning gets a response.
An automated qualification workflow changes the sequence: every inbound inquiry gets scored immediately, hot leads get routed for rapid response, and cold leads get a nurture sequence instead of taking up sales attention.
The Workflow Architecture
Trigger: Form submission webhook, email inbox, or CRM "new lead" event — wherever inbound inquiries arrive.
Step 1 — Extract structured data. A Code or Set node extracts the relevant fields from the raw inquiry: company name, role/title, described use case, contact method, and any qualifying signals in the message body (timeline mentions, budget references, specific technical requirements).
Step 2 — Claude scoring. An HTTP Request node sends the extracted fields to Claude's API with a scoring prompt. Claude returns a structured JSON with:
Step 3 — Route by score. An n8n Switch node routes the lead:
Step 4 — CRM write. For hot and warm leads, an HTTP Request node writes a new record to your CRM (HubSpot, Pipedrive, Notion — whichever you use) including Claude's score and the qualifying signals as tags or custom fields.
Step 5 — Human review for edge cases. An additional condition: if Claude's confidence is flagged as low (the scoring prompt should return a low_confidence: true field when the inquiry is ambiguous), route to a Slack message asking for human review before CRM entry.
The Claude Scoring Prompt
The quality of scoring depends entirely on the prompt. A prompt that works in production:
`
You are a lead qualification assistant for [company name], which sells [brief description of product/service].
Your target customer is [ICP description: company size, role, use case].
Evaluate the following inbound inquiry and return a JSON object with these fields:
Inquiry:
Company: {company}
Role: {role}
Message: {message}
Return only valid JSON. No other text.
`
The key principle: define your ICP explicitly in the prompt. Generic scoring returns mediocre results. A prompt that defines your target as "B2B SaaS companies with 10–500 employees, operations or RevOps roles, asking about workflow automation" will consistently score inquiries against that specific criteria.
What Signals Claude Scores On
For a typical B2B SaaS use case, Claude learns to weight:
Positive signals:
Negative signals:
These signals are implicit in your prompt's ICP description — Claude extracts them without you enumerating every possible phrase.
CRM Integration Pattern
The CRM write step is where most automations introduce complexity. The practical approach: write the minimum viable set of fields on initial automation, and use CRM custom fields for the AI-generated data.
For HubSpot:
ai_qualification_score, ai_qualifying_signals (concatenated string), ai_summaryThis keeps the AI data visible in the CRM contact record without overwriting standard fields that sales reps rely on. Sales reps can see the score and signals in the contact view and decide how to prioritize without having to trust the AI blindly.
The Human-in-the-Loop Condition
The low_confidence flag in the scoring response is your safety valve. When Claude returns low_confidence: true, the workflow routes to a Slack message with the full inquiry text and asks a human to make the qualification decision. This typically happens for:
A workflow that handles 95% of leads automatically and flags 5% for human review is operationally sound. A workflow that tries to handle 100% without human review will make systematic errors on edge cases.
The automation handles the volume. Human judgment handles the exceptions.