Quick overview
This workflow receives inbound lead submissions via a webhook, validates business emails, enriches leads by scraping their website, and uses OpenAI to score ICP fit. It then routes hot leads to Slack, Gmail, and HubSpot, logs all leads to Google Sheets, and responds to the form with the score.
How it works
- Receives an inbound lead as a POST request via a webhook.
- Applies your ICP details and thresholds, normalizes incoming fields, and validates the email while detecting free/role inboxes and deriving the company domain.
- If the email is a valid business address, fetches the lead’s website and extracts a short text sample plus keyword buying signals from the page content.
- Sends the lead details and website signals to OpenAI (gpt-4o-mini) to produce a structured ICP fit score, segment, reasoning, recommended next step, and a personalized opening line.
- Combines the AI fit score with a deterministic data-quality score, assigns the lead to hot/warm/cold tiers, and routes the record accordingly.
- Alerts hot leads in Slack, sends the lead an instant personalized Gmail reply, creates/updates the contact in HubSpot with the appropriate lifecycle stage, appends every lead to Google Sheets, and returns a JSON webhook response with the lead’s score and tier.
Setup
- Create credentials for OpenAI, Slack, Gmail, HubSpot (app token), and Google Sheets in n8n.
- Update the ICP settings, thresholds, and target Slack channel in the “Set ICP and Scoring Rules” step.
- Set your Google Sheets document ID and ensure a sheet named “Leads” exists with columns matching the workflow’s logged fields.
- Copy the production webhook URL and configure your form/chat tool to send a POST JSON body with fields like name, email, company, website, job_title, phone, message, and source.
Requirements
- n8n 1.60 or newer, cloud or self-hosted
- OpenAI API key (gpt-4o-mini or better) for the scoring chain
- Optional: Slack, Gmail, HubSpot app token and Google Sheets credentials
Customization
- Swap the OpenAI model for Anthropic, Gemini, Groq or a local Ollama model - the structured output parser stays the same
- Replace the HubSpot nodes with Pipedrive, Attio, Airtable or Salesforce; they receive the same flat JSON
- Tune hot and warm thresholds, the ICP fields and the 80/20 blend between AI fit and data quality in one Set node
- Add a second LLM chain on the hot branch to draft a full first-touch email from the buying signals
Additional info
Paid template. Buyers receive the workflow JSON plus a step-by-step README (credential setup, Google Sheet header row, curl test command, scoring breakdown and troubleshooting) instantly after purchase on Gumroad, and keep permanent access to the download. Support is handled by replying to the Gumroad receipt. No hardcoded credentials anywhere; all API access goes through n8n credentials. Enrichment uses the lead's own public website, so no paid enrichment API is required.