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": "AI Lead Scoring & Enrichment (Ollama)",
"nodes": [
{
"parameters": {},
"id": "trigger",
"name": "Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
300
]
},
{
"parameters": {
"url": "http://localhost:11434/api/generate",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify({ model: 'llama3:8b', prompt: 'You are a B2B lead scoring expert. Analyze this lead and provide a score from 1-100 and enrichment data.\\n\\nLead info:\\nName: ' + ($json.body.name || 'Unknown') + '\\nEmail: ' + ($json.body.email || 'Unknown') + '\\nCompany: ' + ($json.body.company || 'Unknown') + '\\nJob Title: ' + ($json.body.job_title || 'Unknown') + '\\nMessage: ' + ($json.body.message || 'None') + '\\nSource: ' + ($json.body.source || 'Unknown') + '\\n\\nReturn ONLY valid JSON:\\n{\\n \"score\": 75,\\n \"tier\": \"HOT|WARM|COLD\",\\n \"reasoning\": \"Brief explanation of score\",\\n \"company_size_estimate\": \"startup|smb|mid-market|enterprise\",\\n \"likely_use_case\": \"What they probably need\",\\n \"suggested_action\": \"What to do next\",\\n \"urgency\": \"high|medium|low\",\\n \"personalized_opener\": \"Suggested first line for outreach email\"\\n}', stream: false, options: { temperature: 0.3, num_predict: 500 } }) }}",
"options": {
"timeout": 60000
}
},
"id": "score",
"name": "Score & Enrich Lead (Ollama)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
480,
300
]
},
{
"parameters": {
"jsCode": "const response = JSON.parse($input.first().json.data).response;\nconst match = response.match(/\\{[\\s\\S]*\\}/);\nif (match) {\n const scored = JSON.parse(match[0]);\n const lead = $('Webhook Trigger').first().json.body;\n return [{ json: { ...lead, ...scored, scored_at: new Date().toISOString() } }];\n}\nthrow new Error('Failed to parse scoring response');"
},
"id": "parse",
"name": "Parse Scoring Result",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
720,
300
]
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{ $json.score }}",
"operation": "largerEqual",
"value2": 70
}
]
}
},
"id": "route",
"name": "Route by Score",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
960,
300
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "action",
"name": "action",
"value": "PRIORITY: Reach out within 24 hours",
"type": "string"
}
]
}
},
"id": "hot-lead",
"name": "Hot Lead (70+)",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1200,
200
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "action",
"name": "action",
"value": "Add to nurture sequence",
"type": "string"
}
]
}
},
"id": "warm-lead",
"name": "Warm/Cold Lead (<70)",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1200,
400
]
}
],
"connections": {
"Webhook Trigger": {
"main": [
[
{
"node": "Score & Enrich Lead (Ollama)",
"type": "main",
"index": 0
}
]
]
},
"Score & Enrich Lead (Ollama)": {
"main": [
[
{
"node": "Parse Scoring Result",
"type": "main",
"index": 0
}
]
]
},
"Parse Scoring Result": {
"main": [
[
{
"node": "Route by Score",
"type": "main",
"index": 0
}
]
]
},
"Route by Score": {
"main": [
[
{
"node": "Hot Lead (70+)",
"type": "main",
"index": 0
}
],
[
{
"node": "Warm/Cold Lead (<70)",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"tags": [
{
"name": "AI"
},
{
"name": "Ollama"
},
{
"name": "Sales"
},
{
"name": "Lead Scoring"
}
]
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AI Lead Scoring & Enrichment (Ollama). Uses httpRequest. Webhook trigger; 6 nodes.
Source: https://github.com/bonskari/n8n-ai-workflows/blob/main/download/ai-lead-scorer.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.
This workflow is designed to manage the assignment and validation of unique QR code coupons within a lead generation system with SuiteCRM.
This workflow acts as an instant SDR that replies to new inbound leads across multiple channels in real time. It first captures and normalizes all incoming lead data into a unified structure. The work
AI Lead Qualification & Roting System. Uses httpRequest, twilio, airtable. Webhook trigger; 26 nodes.
A comprehensive n8n workflow template for streamlining influencer application processing with real-time social media data validation, intelligent scoring algorithms, and automated onboarding workflows