This guide explains how to connect lead-intelligence-bot to your automation platform.
When a lead is qualified, the bot sends a POST request with this JSON payload:
{
"name": "Jane Smith",
"email": "jane@example.com",
"goal": "Automate our sales pipeline",
"obstacle": "Current process is manual and slow",
"readiness": "Looking to implement within 2 months",
"score": 8,
"score_label": "HOT",
"conversation_summary": "Interested in sales automation for a 20-person team...",
"timestamp": "2025-01-15T14:30:00.000Z",
"source": "lead-intelligence-bot"
}- Create a new Scenario in Make.com
- Add a Webhook trigger module → "Custom webhook"
- Copy the webhook URL
- Add it to your
.env.local:MAKE_WEBHOOK_URL=https://hook.eu2.make.com/your-webhook-id - Add downstream modules:
- Router — Split by
score_label - Slack — Send notification for HOT leads
- HubSpot — Create/update contact
- Router — Split by
Webhook → Router
├── HOT (score >= 8) → Slack Alert + HubSpot Contact + Calendar Booking
├── WARM (score 5-7) → HubSpot Contact + Email Nurture
└── COLD (score < 5) → HubSpot Contact (low priority)
- Import the workflow from
n8n/lead-workflow.json - Configure your credentials:
- Slack webhook URL
- HubSpot API key
- Activate the workflow
- Copy the webhook URL from the trigger node
- Add it to your
.env.local:N8N_WEBHOOK_URL=https://your-n8n-instance.com/webhook/lead
The included workflow (n8n/lead-workflow.json) contains:
| Node | Purpose |
|---|---|
| Lead Webhook | Receives lead data via POST |
| HOT/WARM Filter | Routes leads by score (>= 7) |
| Slack Notification | Sends formatted alert to Slack |
| HubSpot Contact | Creates CRM contact |
| Response | Confirms receipt |
- Create a new Zap
- Trigger: Webhooks by Zapier → "Catch Hook"
- Copy the webhook URL
- Add it as
MAKE_WEBHOOK_URLin.env.local(the bot uses the same env var) - Add actions:
- Filter — Only continue if
score >= 7 - Slack — Send channel message
- HubSpot — Create contact
- Filter — Only continue if
| Bot Field | HubSpot Property | Salesforce Field |
|---|---|---|
name |
firstname |
FirstName |
email |
email |
Email |
score |
lead_score (custom) |
Rating |
score_label |
lead_status (custom) |
Status |
goal |
notes_last_contacted |
Description |
conversation_summary |
description |
Description |
Send a test webhook locally:
curl -X POST http://localhost:3000/api/extract-lead \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "assistant", "content": "Hi! What brings you here today?"},
{"role": "user", "content": "We need to automate our sales process"},
{"role": "assistant", "content": "What is your team size?"},
{"role": "user", "content": "About 20 people. Budget is around 50k."}
]
}'