This workflow corresponds to n8n.io template #12751 — we link there as the canonical source.
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 →
{
"id": "dzUhWkfShIkWdOzp",
"name": "My workflow 2",
"tags": [],
"nodes": [
{
"id": "2d83abdd-2344-4ee4-af9a-ce86fd687a15",
"name": "Workflow Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-288,
16
],
"parameters": {
"width": 550,
"height": 690,
"content": "## How it works\nEvery hour this workflow fetches fresh leads from your form database, enriches every email address with Clearbit data, and blends the original submission with company details. A scoring script then adds or subtracts points for signals such as company size, funding, industry fit, and email validity. Leads that pass the threshold are written to a **Qualified Leads** list in Trello and the sales channel in Mattermost is alerted instantly. Lower-scoring leads are parked for later review, while enrichment failures are routed to a research queue and the ops channel is notified.\n\n## Setup steps\n1. Create HTTP credentials for your form/CRM API (*crmApi*).\n2. Create HTTP Header credentials for Clearbit (*clearbitApi*).\n3. Add Trello credentials and note your *boardId* and the three *listId* placeholders.\n4. Add Mattermost OAuth2 credentials and capture your *channelId* values.\n5. Replace all placeholder IDs in Trello and Mattermost nodes with real ones.\n6. Activate the workflow\u2014new submissions will now be scored and routed automatically."
},
"typeVersion": 1
},
{
"id": "637dc7ac-dced-4516-82c1-71a8d29ae3e0",
"name": "Intake & Enrichment Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
192
],
"parameters": {
"color": 7,
"width": 546,
"height": 590,
"content": "## Lead Intake & Enrichment\nThis section pulls new raw leads from your primary data source (for example, a form-backend or CRM endpoint). After breaking the array into individual items, each email address is passed to Clearbit\u2019s Person + Company API for enrichment. The Split-In-Batches node ensures we process one lead at a time, preventing any accidental rate-limit explosions. We deliberately set **Continue On Fail** on the Clearbit request so the workflow never halts\u2014failed look-ups are flagged further downstream. The IF node immediately after checks the HTTP status to decide whether to move forward with enriched data or to send the item down the fallback path for manual research."
},
"typeVersion": 1
},
{
"id": "42b7e80b-0f90-4c78-909a-174c9dd816f9",
"name": "Scoring Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
848,
192
],
"parameters": {
"color": 7,
"width": 610,
"height": 590,
"content": "## Scoring & Qualification\nOnce the original lead data and the Clearbit enrichment have been merged, the **Calculate Lead Score** code node assigns points for factors such as employee count, Alexa rank, tech stack, and email deliverability. The scoring logic is intentionally easy to tweak\u2014just edit the weights at the top of the script. The subsequent IF node evaluates whether the total score meets your sales-accepted threshold (default: 70). High-scorers shift right into the Qualified path, while others slide down to the nurture backlog. This modular approach means you can drop-in additional processing (e.g., spam detection or ML models) without touching the rest of the workflow."
},
"typeVersion": 1
},
{
"id": "6dc82e39-236e-48f8-91f2-06d84280c386",
"name": "Storage & Alerts Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1456,
144
],
"parameters": {
"color": 7,
"width": 1010,
"height": 734,
"content": "## Storage & Notifications\nSuccessful leads are written to Trello with rich context in the card description\u2014including raw form data, enrichment highlights, and the numeric score. Sales reps get an immediate ping via Mattermost so nothing slips through the cracks. Unqualified or research-needed leads are filed into separate Trello lists to keep sales boards clean but searchable. Dedicated Mattermost channels alert the operations team whenever enrichment fails, allowing them to chase down missing data without polluting the main sales feed. Because every branch ends with Trello storage, you maintain a single source of truth regardless of lead quality."
},
"typeVersion": 1
},
{
"id": "c105b7f8-59c0-498b-af0b-45c17cd7699d",
"name": "Daily Lead Check",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
304,
512
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "3575b096-6a52-44c6-aca2-799c5c727798",
"name": "Fetch New Leads",
"type": "n8n-nodes-base.httpRequest",
"position": [
512,
512
],
"parameters": {
"url": "https://api.yourcrm.com/leads/new",
"options": {
"timeout": 30000
},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpHeaderAuth"
},
"typeVersion": 4.2
},
{
"id": "41a674a3-7b1e-4e02-a801-f64c4ea8cdb8",
"name": "Parse Leads",
"type": "n8n-nodes-base.code",
"position": [
704,
512
],
"parameters": {
"jsCode": "// Turn the array of leads into individual items\nconst leads = items[0].json.leads || [];\nreturn leads.map(lead => ({ json: lead }));"
},
"typeVersion": 2
},
{
"id": "0d95e513-4ed8-4a14-bf95-a63f16c55a7c",
"name": "Split Leads",
"type": "n8n-nodes-base.splitInBatches",
"position": [
912,
512
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "c7cfe480-21f7-47c6-af5f-a1d5ed6040c5",
"name": "Enrich with Clearbit",
"type": "n8n-nodes-base.httpRequest",
"position": [
1104,
512
],
"parameters": {
"url": "https://person.clearbit.com/v2/people/find?email={{ $json.email }}",
"options": {
"timeout": 20000,
"allowUnauthorizedCerts": false
},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpHeaderAuth"
},
"typeVersion": 4.2
},
{
"id": "3b86455a-9dfd-4e55-a819-d62b5e0bcea8",
"name": "Check Clearbit Response",
"type": "n8n-nodes-base.if",
"position": [
1312,
512
],
"parameters": {
"options": {},
"conditions": {
"number": [
{
"value1": "={{ $json.statusCode }}",
"value2": 400,
"operation": "smaller"
}
]
}
},
"typeVersion": 2
},
{
"id": "44d75802-4cd5-4800-ba15-dca1e583efe2",
"name": "Merge Lead & Enrichment",
"type": "n8n-nodes-base.merge",
"position": [
1504,
512
],
"parameters": {
"mode": "mergeByIndex",
"options": {}
},
"typeVersion": 2.1
},
{
"id": "2d7ceffc-f530-433c-a892-7915ddaad855",
"name": "Calculate Lead Score",
"type": "n8n-nodes-base.code",
"position": [
1712,
512
],
"parameters": {
"jsCode": "// Simple scoring model \u2013 tweak as needed\nconst item = items[0].json;\nlet score = 50; // base score\n\n// Add points for company size\nif (item.company && item.company.metrics && item.company.metrics.employees) {\n const emp = item.company.metrics.employees;\n if (emp > 1000) score += 20;\n else if (emp > 200) score += 10;\n else score += 5;\n}\n\n// Domain quality\nif (item.email && item.email.endsWith('@gmail.com')) score -= 15;\n\n// Industry match example\nif (item.company && item.company.category && item.company.category.industry === 'Software') score += 10;\n\n// Funding indicator\nif (item.company && item.company.metrics && item.company.metrics.raised) score += 10;\n\nreturn [{ json: { ...item, score } }];"
},
"typeVersion": 2
},
{
"id": "fab5a497-359c-43a0-932d-6a2b93d18d1c",
"name": "IF Qualified?",
"type": "n8n-nodes-base.if",
"position": [
1904,
512
],
"parameters": {
"options": {},
"conditions": {
"number": [
{
"value1": "={{ $json.score }}",
"value2": 70,
"operation": "largerEqual"
}
]
}
},
"typeVersion": 2
},
{
"id": "a0b23586-19de-4b4c-88b7-d45941f33b6f",
"name": "Create Trello Card - Qualified",
"type": "n8n-nodes-base.trello",
"position": [
2112,
304
],
"parameters": {
"name": "={{ $json.name }} (Score: {{$json.score}})",
"listId": "QUALIFIED_LIST_ID",
"description": "Qualified lead generated automatically.\\n\\nEmail: {{$json.email}}\\nCompany: {{$json.company.name || 'N/A'}}\\nScore: {{$json.score}}",
"additionalFields": {}
},
"typeVersion": 1
},
{
"id": "aea14c3d-1d41-4c59-80b9-73e4a831981a",
"name": "Notify Sales Team",
"type": "n8n-nodes-base.mattermost",
"position": [
2304,
304
],
"parameters": {
"operation": "create"
},
"typeVersion": 1
},
{
"id": "9b3ff07e-0f46-40ea-ae08-478ccb7f1678",
"name": "Create Trello Card - Unqualified",
"type": "n8n-nodes-base.trello",
"position": [
2112,
704
],
"parameters": {
"name": "={{ $json.name }} (Score: {{$json.score}})",
"listId": "UNQUALIFIED_LIST_ID",
"description": "Lead below qualification threshold.\\n\\nEmail: {{$json.email}}\\nScore: {{$json.score}}",
"additionalFields": {}
},
"typeVersion": 1
},
{
"id": "d4a3307e-cd56-466a-bbfc-15458bb61bc6",
"name": "Fallback Score",
"type": "n8n-nodes-base.code",
"position": [
1504,
704
],
"parameters": {
"jsCode": "// Assign minimal score when enrichment fails\nconst lead = items[0].json;\nlead.score = 10;\nreturn [{ json: lead }];"
},
"typeVersion": 2
},
{
"id": "a06a69fd-598c-467e-9292-4cdcf3c1e783",
"name": "Create Trello Card - Needs Research",
"type": "n8n-nodes-base.trello",
"position": [
1712,
704
],
"parameters": {
"name": "={{ $json.name }} (Needs Research)",
"listId": "RESEARCH_LIST_ID",
"description": "Clearbit enrichment failed.\\nEmail: {{$json.email}}\\nOriginal data stored for manual follow-up.",
"additionalFields": {}
},
"typeVersion": 1
},
{
"id": "384afa40-f53b-4cbb-9f97-06df43651fbf",
"name": "Notify Ops",
"type": "n8n-nodes-base.mattermost",
"position": [
1904,
704
],
"parameters": {
"operation": "create"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "d56122b2-688f-48b8-80f9-0cd26f742bcc",
"connections": {
"Parse Leads": {
"main": [
[
{
"node": "Split Leads",
"type": "main",
"index": 0
}
]
]
},
"Split Leads": {
"main": [
[
{
"node": "Enrich with Clearbit",
"type": "main",
"index": 0
}
],
[
{
"node": "Merge Lead & Enrichment",
"type": "main",
"index": 1
}
]
]
},
"IF Qualified?": {
"main": [
[
{
"node": "Create Trello Card - Qualified",
"type": "main",
"index": 0
}
],
[
{
"node": "Create Trello Card - Unqualified",
"type": "main",
"index": 0
}
]
]
},
"Fallback Score": {
"main": [
[
{
"node": "Create Trello Card - Needs Research",
"type": "main",
"index": 0
}
]
]
},
"Fetch New Leads": {
"main": [
[
{
"node": "Parse Leads",
"type": "main",
"index": 0
}
]
]
},
"Daily Lead Check": {
"main": [
[
{
"node": "Fetch New Leads",
"type": "main",
"index": 0
}
]
]
},
"Calculate Lead Score": {
"main": [
[
{
"node": "IF Qualified?",
"type": "main",
"index": 0
}
]
]
},
"Enrich with Clearbit": {
"main": [
[
{
"node": "Check Clearbit Response",
"type": "main",
"index": 0
}
]
]
},
"Check Clearbit Response": {
"main": [
[
{
"node": "Merge Lead & Enrichment",
"type": "main",
"index": 0
}
],
[
{
"node": "Fallback Score",
"type": "main",
"index": 0
}
]
]
},
"Merge Lead & Enrichment": {
"main": [
[
{
"node": "Calculate Lead Score",
"type": "main",
"index": 0
}
]
]
},
"Create Trello Card - Qualified": {
"main": [
[
{
"node": "Notify Sales Team",
"type": "main",
"index": 0
}
]
]
},
"Create Trello Card - Needs Research": {
"main": [
[
{
"node": "Notify Ops",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automatically enriches incoming form-based leads, calculates a lead-score from multiple data points, and then routes high-value prospects to a Mattermost alert channel while adding all leads to Trello for further handling. It centralizes lead intelligence and…
Source: https://n8n.io/workflows/12751/ — 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 transforms your Meta Ads creatives into a rich dataset of actionable insights. It's designed for data-driven marketers, performance agencies, and analysts who want to move beyond basic m
I created this workflow with great care to help you simplify your daily reporting routine. If you manage Meta Ads campaigns, you know how time-consuming it can be to open Ads Manager, filter data, and
I built this workflow to remove the daily pain of Meta Ads reporting. If you manage multiple ad accounts, you know how time-consuming it is to open Ads Manager, export campaign data, clean spreadsheet
This workflow automatically enriches incoming form leads, applies a customizable scoring model, then routes high-value prospects to a Notion CRM database and a Matrix channel for instant sales notific
This workflow monitors Meta Ads and Google Ads campaigns on a daily schedule to detect performance drops. It fetches yesterday’s campaign data, standardizes metrics, and calculates CTR and ROAS agains