Lead scoring with Claude Haiku
Claude Haiku scores form leads and updates HubSpot. This n8n template receives a form submission through a webhook at /webhook/lead-intake, or runs a manual trigger that generates 20 sample payloads. It normalises fields, validates the email and detects prompt-injection patterns, then sends the free-text message to Anthropic Claude Haiku to extract intent, timeframe, use case and an injection flag. A score and tier are computed, the contact is upserted in HubSpot, Tier A leads are alerted in Slack if that step is enabled and Tier B and C go to HubSpot nurture lists. Every lead is logged to an n8n Data Table.
Steps
- Trigger: Receive a leadWebhook
Webhook, or a manual sample trigger. - Normalize and checkWebhook
Validates the email and detects prompt-injection patterns. - Extract intentAnthropic Claude
Claude Haiku reads the free-text message. - Score and tierAnthropic Claude
Injection-flagged leads get zero. - Output: Upsert the contactHubSpot
After a consistency check. - Output: RouteSlack
Tier A to Slack; Tier B and C to nurture lists; companies looked up or created. - Output: Log and scorecardn8n Data Tables
Every lead logged; scorecard output.
Limits
- The page names Claude Haiku without a version number.
- You create five custom contact properties in HubSpot first.
What it does well
- Leads flagged for prompt injection get a zero score.
- A manual trigger generates 20 sample payloads for testing.
Before you import
Setup: create the five contact properties lead_score, lead_tier, fit_reasons, intent and use_case in HubSpot, and an n8n Data Table named lead_log.
Similar templates
Overdue lead follow-ups with Gemini
Also for sales and leads, 7 steps.
Tally B2B lead scoring with OpenAI
Also for sales and leads, 7 steps.
Typeform lead routing with OpenAI
Also for sales and leads, 11 steps.
HubSpot and Slack: 4 templates compared
Same two apps, different steps.
Anthropic Claude and Slack: 3 templates compared
Same two apps, different steps.
Slack and Webhook: 2 templates compared
Same two apps, different steps.
Capture a lead
Other templates that do this task.