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.

n8nRead on 2026-11-167 steps

Steps

  1. Trigger: Receive a leadWebhook
    Webhook, or a manual sample trigger.
  2. Normalize and checkWebhook
    Validates the email and detects prompt-injection patterns.
  3. Extract intentAnthropic Claude
    Claude Haiku reads the free-text message.
  4. Score and tierAnthropic Claude
    Injection-flagged leads get zero.
  5. Output: Upsert the contactHubSpot
    After a consistency check.
  6. Output: RouteSlack
    Tier A to Slack; Tier B and C to nurture lists; companies looked up or created.
  7. 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