Score inbound leads with Claude and route HubSpot lifecycle stages

Go to Workflow
0 views
Built by Anas Ashfaq Anas Ashfaq
Created on June 11, 2026

Description

Quick overview
This workflow receives inbound leads via webhook, uses Anthropic Claude (with website scraping and web search) to score and classify them, then updates HubSpot lifecycle stage, creates deals for hot leads, alerts Slack, and sends tier-specific replies through Gmail.

How it works
Receives a POST webhook request containing lead details (name, email, company, job title, and message).
Ensures three HubSpot contact properties exist for AI scoring (ai_lead_score, ai_lead_tier, ai_score_reason).
Extracts the company domain from the lead’s email and fetches the company website homepage content.
Uses Anthropic Claude web search to gather third-party company intelligence while excluding the company’s own domain.
Builds a lead profile and sends the form data, website text, and external research to Anthropic Claude to return a 1–10 score, a reason, and a drafted reply email.
Upserts the contact in HubSpot, sets the lifecycle stage based on score thresholds, and writes the AI score fields to the contact record.
Routes by tier: for hot leads it creates a HubSpot deal, posts a Slack alert, and sends the generated email via Gmail, while warm and cold leads receive their respective generated emails via Gmail.

Setup
Add credentials for HubSpot (App Token), Anthropic (API key), Slack (OAuth2), and Gmail (OAuth2).
Set your ICP description, hot/warm score thresholds, and the target Slack channel ID in the Lead Scoring Config step.
Activate the workflow, copy the webhook URL, and configure your lead capture form to POST the expected fields to the webhook path (lead-intake).

Nodes Used (5)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
HTTP Request
n8n-nodes-base.httpRequest
HubSpot
n8n-nodes-base.hubspot
Slack
n8n-nodes-base.slack