Quick Overview
This workflow receives inbound lead submissions via a webhook, fetches the company website for context, uses OpenAI GPT-4o-mini to score and qualify the lead with structured output, upserts the contact into HubSpot, and posts high-priority or nurture notifications to Slack.
How it works
- Receives a POST request on an n8n webhook with inbound lead details (name, email, company, and message).
- Normalizes the incoming fields and derives the company domain from the email address.
- Fetches the prospect’s company website homepage HTML using an HTTP request.
- Sends the lead details plus a cleaned website snippet to OpenAI (GPT-4o-mini) and parses a strict JSON result containing lead score, tier, summary, reasoning, and an outreach icebreaker.
- Creates or updates the matching contact in HubSpot with the qualification details stored in the contact fields.
- Routes leads with a score of 70 or higher to a Slack sales channel and logs lower-scoring leads to a separate Slack nurture channel.
Setup
- Copy the webhook URL from the “Inbound Lead Webhook” trigger and configure your form/tool to send lead submissions to it via POST.
- Add an OpenAI API credential for the OpenAI Chat Model node.
- Connect your HubSpot OAuth2 credential and confirm which contact properties you want to populate in the upsert step.
- Connect your Slack credential and update the target channels (for example, #sales-hot-leads and #marketing-nurture-feed) to match your workspace.
- Adjust the lead score threshold (currently 70) and the ICP prompt text if you want different routing and qualification criteria.