# Score and triage inbound leads with OpenAI, HubSpot, and Slack

> Quick overview This workflow receives new lead submissions via a webhook, normalizes the data, scores the lead with OpenAI, sends an acknowledgment email, upserts the contact into HubSpot, and posts a Slack alert when the score meets a configured “hot lead” threshold. How it works 1. Receives a POST request on a webhook endpoint whenever a new lead is submitted. 2. Normalizes incoming form fields into a consistent lead object (name, email, phone, company, message, source) and prepares an OpenAI Chat Completions request. 3. Sends the lead details to the OpenAI API to generate a 1–10 score plus a short reason and summary in JSON. 4. Parses the OpenAI response and attaches the score, reason, and summary to the lead record. 5. Sends a thank-you email to the lead using your SMTP mail server with a booking link for follow-up. 6. Upserts the lead as a contact in HubSpot using the email address as the unique identifier. 7. Posts a message to Slack via an incoming webhook when the lead score is

- **Domain**: `n8n-workflow-21704.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/21704
- Page (HTML): https://agenstry.com/agents/n8n-workflow-21704.n8n.io
- Documentation: https://n8n.io/workflows/21704
