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 →
{
"name": "Lead Enrichment",
"description": "Enrich raw leads with firmographic data from lead database. Marks unknown domains for manual research.",
"nodes": [
{
"name": "Webhook Input",
"type": "n8n-nodes-base.webhook",
"position": [
0,
0
],
"parameters": {
"path": "lead-enrich",
"method": "POST",
"options": {}
}
},
{
"name": "Enrichment Lookup",
"type": "n8n-nodes-base.function",
"position": [
300,
0
],
"parameters": {
"functionCode": "// Enrich each lead against the lead database by domain\nconst enriched = [];\nlet enrichedCount = 0;\nlet needsResearch = 0;\n\nfor (const lead of $input.all()) {\n const domain = lead.json.domain;\n const enrichment = $mockClients.leadDatabase.enrich(domain);\n \n if (enrichment) {\n enriched.push({\n ...enrichment,\n contact_name: lead.json.contact_name,\n email: lead.json.email,\n enrichment_status: 'enriched'\n });\n enrichedCount++;\n } else {\n enriched.push({\n domain,\n contact_name: lead.json.contact_name,\n email: lead.json.email,\n enrichment_status: 'needs_research'\n });\n needsResearch++;\n }\n}\n\nreturn enriched.map(item => ({ json: item }));"
}
},
{
"name": "CRM Update",
"type": "n8n-nodes-base.function",
"position": [
600,
-100
],
"parameters": {
"functionCode": "// Update CRM with enriched leads\nconst crmRecords = $input.all()\n .filter(item => item.json.enrichment_status === 'enriched')\n .map(item => ({\n email: item.json.email,\n company: item.json.company,\n industry: item.json.industry,\n contact_role: item.json.contact_role\n }));\n\nreturn crmRecords.map(r => ({ json: r }));"
}
},
{
"name": "Research Queue",
"type": "n8n-nodes-base.function",
"position": [
600,
100
],
"parameters": {
"functionCode": "// Route needs_research leads to manual research queue\nconst needsResearch = $input.all()\n .filter(item => item.json.enrichment_status === 'needs_research')\n .map(item => item.json);\n\nreturn needsResearch.map(r => ({ json: r }));"
}
},
{
"name": "Summary Output",
"type": "n8n-nodes-base.function",
"position": [
900,
0
],
"parameters": {
"functionCode": "// Generate summary\nconst enrichedLeads = $input.all();\nreturn [{\n json: {\n enriched_leads: enrichedLeads,\n total: enrichedLeads.length,\n enriched: enrichedLeads.filter(l => l.json.enrichment_status === 'enriched').length,\n needs_research: enrichedLeads.filter(l => l.json.enrichment_status === 'needs_research').length\n }\n}];"
}
}
],
"connections": [
{
"source": "Webhook Input",
"target": "Enrichment Lookup"
},
{
"source": "Enrichment Lookup",
"target": "CRM Update",
"source_output": "main",
"target_input": "main"
},
{
"source": "Enrichment Lookup",
"target": "Research Queue",
"source_output": "main",
"target_input": "main"
},
{
"source": "CRM Update",
"target": "Summary Output"
},
{
"source": "Research Queue",
"target": "Summary Output"
}
],
"metadata": {
"pattern_number": 3,
"category": "enrichment",
"privacy_notes": "No PII stored in enrichment results \u2014 contact_name and email passed through from input only.",
"data_quality_notes": "Unknown domains produce null enrichment fields; downstream systems must handle missing data gracefully."
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Lead Enrichment. Webhook trigger; 5 nodes.
Source: https://github.com/stefan-mcf/automation-kit/blob/main/patterns/lead-enrichment/workflow.json — 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.
This workflow automates bulk email campaigns with built-in validation, deliverability protection, and smart send-time optimization.
Who is this for? Solo founders, sales teams, and event organizers who need email outreach without expensive tools but want full control from Telegram.
Universal Lead Processing Workflow. Uses googleSheets, gmail, httpRequest, gmailTrigger. Webhook trigger; 34 nodes.
This workflow turns Feishu bot messages into a human-in-the-loop short-video production pipeline, using Tavily for web search, DeepSeek for topic and script generation, Jimeng AI for text-to-video, an
This workflow is designed to manage the assignment and validation of unique QR code coupons within a lead generation system with SuiteCRM.