This workflow corresponds to n8n.io template #7343 — we link there as the canonical source.
This workflow follows the HTTP Request → HubSpot recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "fb029ad8-8110-4407-8a54-614bcbafddd8",
"name": "Sticky Note - Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1312,
-144
],
"parameters": {
"width": 492,
"height": 464,
"content": "## Lead Capture & Auto-Qualification Workflow\n\n**Purpose:** Automatically capture leads from multiple sources, enrich with company data, qualify based on criteria, and route to appropriate sales actions.\n\n**Security:** Uses environment variables for API keys - no hardcoded credentials!\n\n**Flow:** Webhook \u2192 Validation \u2192 Enrichment \u2192 Qualification \u2192 CRM/Notifications"
},
"typeVersion": 1
},
{
"id": "49d3b848-dc51-43cf-b22b-cfb9f8e24c77",
"name": "Lead Capture Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-224,
400
],
"parameters": {
"path": "lead-capture",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "ad3ce370-da9d-4ba3-ab48-834c2e6bce34",
"name": "Sticky Note - Webhook Setup",
"type": "n8n-nodes-base.stickyNote",
"position": [
-816,
-144
],
"parameters": {
"width": 520,
"height": 460,
"content": "## Webhook Configuration\n\n**Endpoint:** `/lead-capture`\n**Method:** POST\n**Expected Data:**\n- email (required)\n- firstName\n- lastName\n- company\n- phone\n- source\n- message"
},
"typeVersion": 1
},
{
"id": "059a2f3a-dc94-42c6-9273-cbb24ad894e7",
"name": "Validate Lead Data",
"type": "n8n-nodes-base.if",
"position": [
0,
400
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "email-validation",
"operator": {
"type": "string",
"operation": "isNotEmpty"
},
"leftValue": "={{ $json.email }}",
"rightValue": ""
},
{
"id": "email-format",
"operator": {
"type": "string",
"operation": "regex"
},
"leftValue": "={{ $json.email }}",
"rightValue": "^[\\w-\\.]+@[\\w-]+\\.[a-zA-Z]{2,}$"
}
]
}
},
"typeVersion": 2
},
{
"id": "c50640e7-bdab-4680-beb4-96e9dd379ebe",
"name": "Sticky Note - Data Validation",
"type": "n8n-nodes-base.stickyNote",
"position": [
-288,
-448
],
"parameters": {
"width": 340,
"height": 408,
"content": "## Data Validation Rules\n\n**Required Fields:**\n- Valid email format\n- Email not empty\n\n**Optional Enhancement:**\n- Phone validation\n- Company name validation\n- Source validation"
},
"typeVersion": 1
},
{
"id": "409667ca-b5ab-4cab-864b-1b468da0ddca",
"name": "Enrich with Clearbit",
"type": "n8n-nodes-base.clearbit",
"position": [
224,
208
],
"parameters": {
"email": "={{ $json.email }}",
"resource": "person",
"additionalFields": {}
},
"typeVersion": 1
},
{
"id": "b16da09c-2e02-4a25-8ffb-fb6d18d44273",
"name": "Sticky Note - Enrichment",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
-448
],
"parameters": {
"width": 344,
"height": 268,
"content": "## Lead Enrichment\n\n**Clearbit provides:**\n- Company size\n- Industry\n- Technologies used\n- Social profiles\n- Location data\n\n**\u26a0\ufe0f Security:** API key stored in credentials, not hardcoded!"
},
"typeVersion": 1
},
{
"id": "c4e3201e-f8f8-42bf-b142-e12a63d6cdd6",
"name": "Enrich with Apollo",
"type": "n8n-nodes-base.httpRequest",
"position": [
224,
400
],
"parameters": {
"url": "={{ $env.APOLLO_API_URL }}/v1/people/match",
"options": {},
"sendBody": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "email",
"value": "={{ $json.email }}"
},
{
"name": "first_name",
"value": "={{ $json.firstName }}"
},
{
"name": "last_name",
"value": "={{ $json.lastName }}"
}
]
},
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Cache-Control",
"value": "no-cache"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "dbbb2ca7-c9e1-4a32-8270-fb9bdf328c54",
"name": "Merge Enrichment Data",
"type": "n8n-nodes-base.merge",
"position": [
448,
304
],
"parameters": {},
"typeVersion": 3
},
{
"id": "6c14adc8-bdac-4a21-a1ae-ce9fc61605d1",
"name": "Sticky Note - Lead Scoring",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
-448
],
"parameters": {
"width": 396,
"height": 388,
"content": "## Lead Qualification Criteria\n\n**High Priority (Score 80+):**\n- Company size >500 employees\n- Tech/SaaS industry\n- Manager+ title\n- Enterprise email domain\n\n**Medium Priority (Score 50-79):**\n- Company size 50-500\n- Relevant industry\n- Business email\n\n**Low Priority (<50):**\n- Small company\n- Personal email\n- Irrelevant industry"
},
"typeVersion": 1
},
{
"id": "1318776b-db42-4031-bc8c-5224889da500",
"name": "Calculate Lead Score",
"type": "n8n-nodes-base.code",
"position": [
672,
304
],
"parameters": {
"jsCode": "// Lead Qualification & Scoring Logic\nconst lead = $input.first().json;\nconst enrichment = lead.enrichment_data || {};\n\n// Initialize score\nlet score = 0;\nlet qualificationNotes = [];\n\n// Company Size Scoring\nif (enrichment.company?.metrics?.employees) {\n const employees = enrichment.company.metrics.employees;\n if (employees >= 500) {\n score += 30;\n qualificationNotes.push('Large company (500+ employees)');\n } else if (employees >= 50) {\n score += 20;\n qualificationNotes.push('Medium company (50-500 employees)');\n } else if (employees >= 10) {\n score += 10;\n qualificationNotes.push('Small company (10-50 employees)');\n }\n}\n\n// Industry Scoring\nconst targetIndustries = ['Technology', 'Software', 'SaaS', 'Finance', 'Healthcare'];\nif (enrichment.company?.category?.industry) {\n if (targetIndustries.includes(enrichment.company.category.industry)) {\n score += 25;\n qualificationNotes.push(`Target industry: ${enrichment.company.category.industry}`);\n }\n}\n\n// Title/Role Scoring\nif (enrichment.person?.employment?.title) {\n const title = enrichment.person.employment.title.toLowerCase();\n if (title.includes('ceo') || title.includes('founder') || title.includes('president')) {\n score += 25;\n qualificationNotes.push('C-level executive');\n } else if (title.includes('director') || title.includes('vp') || title.includes('manager')) {\n score += 15;\n qualificationNotes.push('Management level');\n }\n}\n\n// Email Domain Scoring\nconst email = lead.email || '';\nconst domain = email.split('@')[1];\nconst personalDomains = ['gmail.com', 'yahoo.com', 'hotmail.com', 'outlook.com'];\nif (!personalDomains.includes(domain)) {\n score += 10;\n qualificationNotes.push('Business email domain');\n} else {\n qualificationNotes.push('Personal email domain');\n}\n\n// Revenue Scoring (if available)\nif (enrichment.company?.metrics?.annualRevenue) {\n const revenue = enrichment.company.metrics.annualRevenue;\n if (revenue >= 10000000) { // $10M+\n score += 20;\n qualificationNotes.push('High revenue company ($10M+)');\n } else if (revenue >= 1000000) { // $1M+\n score += 10;\n qualificationNotes.push('Medium revenue company ($1M+)');\n }\n}\n\n// Determine qualification level\nlet qualificationLevel;\nlet priority;\nif (score >= 80) {\n qualificationLevel = 'High';\n priority = 'Immediate Follow-up';\n} else if (score >= 50) {\n qualificationLevel = 'Medium';\n priority = 'Follow-up within 24h';\n} else if (score >= 25) {\n qualificationLevel = 'Low';\n priority = 'Add to nurture sequence';\n} else {\n qualificationLevel = 'Unqualified';\n priority = 'Archive or reject';\n}\n\n// Return enriched lead data\nreturn {\n ...lead,\n qualification: {\n score: score,\n level: qualificationLevel,\n priority: priority,\n notes: qualificationNotes,\n timestamp: new Date().toISOString()\n },\n enriched_company: enrichment.company || {},\n enriched_person: enrichment.person || {}\n};"
},
"typeVersion": 2
},
{
"id": "2398e080-42c8-405e-a430-f27389b930c8",
"name": "Route by Qualification",
"type": "n8n-nodes-base.if",
"position": [
896,
304
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "high-score",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.qualification.score }}",
"rightValue": 80
}
]
}
},
"typeVersion": 2
},
{
"id": "6490475a-d9bb-43c1-8bbf-3379cfd40754",
"name": "Sticky Note - High Priority Actions",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
-448
],
"parameters": {
"width": 392,
"height": 316,
"content": "## High Priority Lead Actions\n\n**Immediate Actions:**\n- Create lead in CRM\n- Notify sales team via Slack\n- Send personalized welcome email\n- Schedule follow-up task\n\n**Data Stored:**\n- All enrichment data\n- Qualification score & notes\n- Source tracking"
},
"typeVersion": 1
},
{
"id": "7a157570-3e7d-4584-81a1-1f2502516843",
"name": "Create HubSpot Contact",
"type": "n8n-nodes-base.hubspot",
"position": [
1120,
16
],
"parameters": {
"operation": "create"
},
"typeVersion": 2
},
{
"id": "98170537-d67e-49ee-9819-709a12e29710",
"name": "Notify Sales Team - High Priority",
"type": "n8n-nodes-base.slack",
"position": [
1120,
208
],
"parameters": {
"text": "\ud83d\udea8 **High Priority Lead Alert!** \ud83d\udea8",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $env.SLACK_SALES_CHANNEL_ID }}"
},
"otherOptions": {}
},
"typeVersion": 2.2
},
{
"id": "99245b66-8d64-4b85-b998-892f59b2a2e1",
"name": "Create HubSpot Contact - Medium",
"type": "n8n-nodes-base.hubspot",
"position": [
1120,
400
],
"parameters": {
"operation": "create"
},
"typeVersion": 2
},
{
"id": "e1bc4f06-267e-426a-a064-836b448a4403",
"name": "Sticky Note - Medium Priority Actions",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
-128
],
"parameters": {
"width": 392,
"height": 120,
"content": "## Medium/Low Priority Actions\n\n**Medium Priority:**\n- Create lead in CRM\n- Add to nurture sequence\n- Schedule follow-up in 24-48h\n\n**Low Priority:**\n- Add to CRM\n- Add to long-term nurture\n- Monthly check-in"
},
"typeVersion": 1
},
{
"id": "402a9234-f2c2-483f-81df-32629b306d55",
"name": "Notify Marketing - Medium Priority",
"type": "n8n-nodes-base.slack",
"position": [
1120,
592
],
"parameters": {
"text": "\ud83d\udccb New Medium Priority Lead",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "={{ $env.SLACK_MARKETING_CHANNEL_ID }}"
},
"otherOptions": {}
},
"typeVersion": 2.2
},
{
"id": "63d95fd7-f5ac-4192-9f2b-d35bd0fa1d0b",
"name": "Log Invalid Data",
"type": "n8n-nodes-base.noOp",
"position": [
224,
592
],
"parameters": {},
"typeVersion": 1
},
{
"id": "9fc03270-9915-46ab-a08c-8ff937119a31",
"name": "Sticky Note - Error Handling",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
-176
],
"parameters": {
"width": 356,
"height": 120,
"content": "## Error Handling\n\n**Invalid Data Path:**\n- Log the invalid data\n- Send error notification\n- Return 400 status\n\n**Enrichment Failures:**\n- Continue with basic data\n- Log enrichment errors\n- Use fallback scoring"
},
"typeVersion": 1
},
{
"id": "a42f2d44-3eaf-4896-bc04-223fe770bc04",
"name": "Sticky Note - Environment Variables",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1328,
320
],
"parameters": {
"width": 524,
"height": 480,
"content": "## Required Environment Variables\n\n**\ud83d\udd10 Security - No Hardcoded Keys!**\n\n- `APOLLO_API_URL`\n- `SLACK_SALES_CHANNEL_ID`\n- `SLACK_MARKETING_CHANNEL_ID`\n- `CRM_ASSIGNMENT_URL`\n\n**Credentials Required:**\n- Clearbit API\n- Apollo API (HTTP Header Auth)\n- HubSpot API\n- Slack API"
},
"typeVersion": 1
},
{
"id": "6ee62c3b-f74a-466b-899d-b61edff40f8f",
"name": "Sticky Note - Integration Points",
"type": "n8n-nodes-base.stickyNote",
"position": [
-816,
320
],
"parameters": {
"width": 520,
"height": 480,
"content": "## Integration Sources\n\n**This webhook can receive leads from:**\n- Website contact forms\n- Landing page forms\n- Facebook Lead Ads\n- LinkedIn Lead Gen Forms\n- Webinar registrations\n- Free trial signups\n- Content downloads\n\n**Format:** POST to `/lead-capture`"
},
"typeVersion": 1
}
],
"connections": {
"Enrich with Apollo": {
"main": [
[
{
"node": "Merge Enrichment Data",
"type": "main",
"index": 1
}
]
]
},
"Validate Lead Data": {
"main": [
[
{
"node": "Enrich with Clearbit",
"type": "main",
"index": 0
},
{
"node": "Enrich with Apollo",
"type": "main",
"index": 0
}
],
[
{
"node": "Log Invalid Data",
"type": "main",
"index": 0
}
]
]
},
"Calculate Lead Score": {
"main": [
[
{
"node": "Route by Qualification",
"type": "main",
"index": 0
}
]
]
},
"Enrich with Clearbit": {
"main": [
[
{
"node": "Merge Enrichment Data",
"type": "main",
"index": 0
}
]
]
},
"Lead Capture Webhook": {
"main": [
[
{
"node": "Validate Lead Data",
"type": "main",
"index": 0
}
]
]
},
"Merge Enrichment Data": {
"main": [
[
{
"node": "Calculate Lead Score",
"type": "main",
"index": 0
}
]
]
},
"Route by Qualification": {
"main": [
[
{
"node": "Create HubSpot Contact",
"type": "main",
"index": 0
},
{
"node": "Notify Sales Team - High Priority",
"type": "main",
"index": 0
}
],
[
{
"node": "Create HubSpot Contact - Medium",
"type": "main",
"index": 0
},
{
"node": "Notify Marketing - Medium Priority",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
How it works This Lead Capture & Auto-Qualification workflow transforms raw leads into qualified prospects through intelligent automation. Here's the high-level flow: Lead Intake → Data Validation → Enrichment → Scoring → Smart Routing → CRM Integration & Notifications The…
Source: https://n8n.io/workflows/7343/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Automate your lead qualification pipeline — capture Typeform Webhook leads, enrich with APIs, score intelligently, and route to HubSpot, Slack, and Sheets in real-time.
AI-Powered Lead Qualification & Routing System. Uses supabase, httpRequest, openAi, slack. Webhook trigger; 47 nodes.
Real-Time Lead Processing - Captures and processes leads instantly from website forms with zero delay Intelligent Fit Scoring - Automatically scores leads 0-100 based on company size, seniority, and r
This workflow automatically analyzes website visitors in real-time, enriches their data with company intelligence, and provides lead scoring and sales alerts. Webhook Trigger - Receives visitor data f
Enterprise AI Lead Scoring & CRM Sync. Uses httpRequest, hubspot, googleSheets. Webhook trigger; 6 nodes.