GenAiHub

Last checked 24 November 2026 — responded normally.

Score and route web form leads using Claude Haiku, HubSpot and Slack

Quick overview

Live
Open / InstallLast updated November 24, 2026

Description

Quick overview This workflow receives website form leads via webhook (or runs with sample payloads), uses Anthropic Claude Haiku to classify intent from the message, scores and tiers each lead, then upserts contacts in HubSpot, optionally alerts sales in Slack for Tier A, and logs outcomes to an n8n Data Table. How it works Receives a form submission via a webhook (or you can run a manual trigger that generates 20 sample payloads). Normalizes the incoming fields, validates email format, detects common prompt-injection patterns, and keeps invalid leads with a reason instead of dropping them. Sends the free-text message to Anthropic Claude Haiku to extract structured intent, timeframe, use case, and an injection flag. Combines the validated fields and Claude output to compute a lead score, assign a tier (A/B/C) with human-readable reasons, and zero-scores anything flagged as injection. Runs a final consistency check and, if it passes, upserts the contact in HubSpot with five custom properties and records whether the HubSpot sync succeeded. Routes Tier A leads to a Slack alert (if enabled) and routes Tier B/C leads into HubSpot nurture lists, while work-email leads also trigger a HubSpot company lookup by domain and company creation if missing. Inserts every processed lead (including invalid or failed HubSpot syncs) into an n8n Data Table log and outputs a scorecard summarizing routing, drops, injections, and HubSpot errors. Setup Add an Anthropic credential for the Claude Haiku model in the Anthropic chat model node. For live HubSpot routing, add a HubSpot private app token (Contacts, Companies, and Lists scopes) to all HubSpot nodes, unpin the sample data, and create the five contact properties: lead_score, lead_tier, fit_reasons, intent, use_case. Update the HubSpot list IDs used for Tier B and Tier C in the nurture-list step to match your static lists. Optional: add a Slack credential, enable the Slack alert step, set your target channel, and replace YOUR_PORTAL_ID in the HubSpot record link. Optional: create an n8n Data Table named lead_log with the columns email_domain, tier, score, fit_reasons, intent, and dropped_reason for persistent logging. To use the webhook trigger, enable it and copy the webhook URL (path: /webhook/lead-intake) into your form tool so it POSTs the expected fields (email, name, company, country, team_size, message). An n8n automation workflow template by Swaraj Yadav.

Community Metrics

Views
1
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Swaraj Yadav

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • slack
  • hubspot
  • code
  • basic-llm-chain
  • anthropic-chat-model
  • structured-output-parser

Capabilities

  • 6 nodes
  • 1 views

Information

TypeWorkflow
Sourcen8n
AddedOctober 30, 2026

Comments

?

Others in the same category, ranked by how often they are opened.