This workflow corresponds to n8n.io template #12082 — we link there as the canonical source.
This workflow follows the Error Trigger → Gmail 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": "492a80ad-8f83-4b7a-a014-d825d097e396",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-12672,
-784
],
"parameters": {},
"typeVersion": 1
},
{
"id": "43e17396-64a8-403c-8ea2-7fc5d11c0f81",
"name": "Webhook - Web Form",
"type": "n8n-nodes-base.webhook",
"position": [
-12672,
-592
],
"parameters": {},
"typeVersion": 2
},
{
"id": "b4f808e3-ba0e-4c54-8e10-d68877d5798b",
"name": "Webhook - WhatsApp/Telegram",
"type": "n8n-nodes-base.webhook",
"position": [
-12672,
-384
],
"parameters": {},
"typeVersion": 2
},
{
"id": "e2918869-b14e-440d-85c7-3d16bd958a3b",
"name": "Auto Nurturing Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-12672,
416
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "a5274a05-57c3-46b6-825e-4970b339ed72",
"name": "Weekly Report Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-12672,
848
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "77032e20-9603-40a5-9c49-1ab82778654d",
"name": "Normalize Input",
"type": "n8n-nodes-base.code",
"position": [
-12368,
-592
],
"parameters": {},
"typeVersion": 2
},
{
"id": "5682016f-254b-4327-b117-a8a343e6cb29",
"name": "Is Valid Lead?",
"type": "n8n-nodes-base.if",
"position": [
-12128,
-592
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a9879846-c77d-4b52-bd53-47249838dcd8",
"name": "Find Existing Lead",
"type": "n8n-nodes-base.googleSheets",
"position": [
-11888,
-688
],
"parameters": {},
"typeVersion": 4
},
{
"id": "1e9ecf43-3608-4a3f-9ed4-7539b06b0eff",
"name": "Check History",
"type": "n8n-nodes-base.code",
"position": [
-11648,
-688
],
"parameters": {},
"typeVersion": 2
},
{
"id": "04e6e6e8-e8b2-430b-b1b8-cea463edae31",
"name": "AI Analysis Engine",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-11408,
-688
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6c82292c-b2b1-4d4a-9c5f-5f0391f9bae5",
"name": "Calculate Lead Score",
"type": "n8n-nodes-base.code",
"position": [
-11168,
-688
],
"parameters": {},
"typeVersion": 2
},
{
"id": "ac018fe3-b208-4d56-ae6d-2fd5860c46f5",
"name": "Action Router",
"type": "n8n-nodes-base.switch",
"position": [
-10928,
-688
],
"parameters": {},
"typeVersion": 2
},
{
"id": "2ce89cfe-d860-4804-8bd1-82bda699b18c",
"name": "Generate Response - Demo",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-10672,
-816
],
"parameters": {},
"typeVersion": 1
},
{
"id": "cb0a8c24-f241-4500-96a8-a31474bb076b",
"name": "Generate Response - Info",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-10672,
-608
],
"parameters": {},
"typeVersion": 1
},
{
"id": "56f6b3ff-1060-4ed8-be6f-b4301960c340",
"name": "Generate Response - Nurturing",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-10672,
-416
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f76b606d-4fe4-40b0-a90c-ffa3efaabc29",
"name": "Prepare Email - Demo",
"type": "n8n-nodes-base.code",
"position": [
-10432,
-816
],
"parameters": {},
"typeVersion": 2
},
{
"id": "d7b63b38-7883-4369-8a09-328dc2665928",
"name": "Prepare Email - Info",
"type": "n8n-nodes-base.code",
"position": [
-10432,
-608
],
"parameters": {},
"typeVersion": 2
},
{
"id": "5ff8afb9-4432-44c8-b232-c9d6ed99d03c",
"name": "Prepare Email - Nurturing",
"type": "n8n-nodes-base.code",
"position": [
-10432,
-416
],
"parameters": {},
"typeVersion": 2
},
{
"id": "549b239c-ec69-41ff-ba7e-6156f7c51ae7",
"name": "Send Email",
"type": "n8n-nodes-base.gmail",
"onError": "continueErrorOutput",
"position": [
-10048,
-752
],
"parameters": {},
"typeVersion": 2
},
{
"id": "127d9cdd-0f27-4f03-9123-cbca4f8e44b7",
"name": "Save/Update Lead",
"type": "n8n-nodes-base.code",
"position": [
-9808,
-752
],
"parameters": {},
"typeVersion": 2
},
{
"id": "b730d5e5-c9f2-41ae-9d9b-d2320734c2ac",
"name": "Sheet - New Lead",
"type": "n8n-nodes-base.googleSheets",
"position": [
-9552,
-864
],
"parameters": {},
"typeVersion": 4
},
{
"id": "6c1efcf1-0d74-47a2-ba0f-4ebffb11244c",
"name": "Sheet - Update Lead",
"type": "n8n-nodes-base.googleSheets",
"position": [
-9552,
-656
],
"parameters": {},
"typeVersion": 4
},
{
"id": "f0375734-c576-4bca-88b5-522ca3a91dd8",
"name": "Is New Lead?",
"type": "n8n-nodes-base.if",
"position": [
-9552,
-752
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a44a4532-578e-4e04-bf7f-c6665de00fb3",
"name": "Log Interaction",
"type": "n8n-nodes-base.googleSheets",
"position": [
-9312,
-752
],
"parameters": {},
"typeVersion": 4
},
{
"id": "6d1a471b-04b6-4776-97be-5f01e70a2a5f",
"name": "Notify Sales?",
"type": "n8n-nodes-base.if",
"position": [
-9072,
-752
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c3d19891-be49-46ad-8348-29b6f6b56cc9",
"name": "Slack - Hot Lead Alert",
"type": "n8n-nodes-base.slack",
"position": [
-8832,
-864
],
"parameters": {},
"typeVersion": 2
},
{
"id": "00316e5d-7915-47d8-a2c9-3335a4190e4b",
"name": "Leads for Nurturing",
"type": "n8n-nodes-base.googleSheets",
"position": [
-12368,
416
],
"parameters": {},
"typeVersion": 4
},
{
"id": "4108d285-8835-4d66-bd9e-92720b28bf52",
"name": "Filter for Nurturing",
"type": "n8n-nodes-base.code",
"position": [
-12128,
416
],
"parameters": {},
"typeVersion": 2
},
{
"id": "f77c6397-c770-4b11-b090-3a2402d7da9f",
"name": "AI Nurturing Email",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-11888,
416
],
"parameters": {},
"typeVersion": 1
},
{
"id": "91d07eb2-d2d2-4c1a-9eb7-8a571792b99e",
"name": "Read Report Data",
"type": "n8n-nodes-base.googleSheets",
"position": [
-12368,
848
],
"parameters": {},
"typeVersion": 4
},
{
"id": "d5df1ae4-b796-4a5e-86d7-250a5dc1905a",
"name": "Calculate Metrics",
"type": "n8n-nodes-base.code",
"position": [
-12128,
848
],
"parameters": {},
"typeVersion": 2
},
{
"id": "601108fe-fb15-4f10-a50f-36c6b317554c",
"name": "Slack - Weekly Report",
"type": "n8n-nodes-base.slack",
"position": [
-11888,
848
],
"parameters": {},
"typeVersion": 2
},
{
"id": "af1a3fc4-427f-4f6b-838f-75ab019026d5",
"name": "Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"position": [
-12656,
1248
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8a503126-2c79-4ae3-afc8-6e8189b7ff0d",
"name": "Slack - Error Alert",
"type": "n8n-nodes-base.slack",
"position": [
-12352,
1248
],
"parameters": {},
"typeVersion": 2
},
{
"id": "927b9be3-8c34-4d34-8b4f-af62f0077d46",
"name": "Disqualify Lead",
"type": "n8n-nodes-base.code",
"position": [
-10672,
-208
],
"parameters": {},
"typeVersion": 2
},
{
"id": "7ec4f334-d220-4cb7-a5dc-100d98f5aa0f",
"name": "Create Call Task",
"type": "n8n-nodes-base.code",
"position": [
-10672,
-16
],
"parameters": {},
"typeVersion": 2
},
{
"id": "510345d6-5680-4261-9420-28f0017dcfe5",
"name": "Slack - Call Task",
"type": "n8n-nodes-base.slack",
"position": [
-10432,
-16
],
"parameters": {},
"typeVersion": 2
},
{
"id": "a43f2662-367b-483c-ba3b-90e7dab1b05c",
"name": "Ignore",
"type": "n8n-nodes-base.noOp",
"position": [
-11888,
-480
],
"parameters": {},
"typeVersion": 1
},
{
"id": "074c2af0-d801-4086-ab94-29d3ef27c4dd",
"name": "Done",
"type": "n8n-nodes-base.noOp",
"position": [
-8592,
-752
],
"parameters": {},
"typeVersion": 1
},
{
"id": "013c8183-9c06-41b5-9136-085bc0bb63bf",
"name": "Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-13248,
-992
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "8bb61eff-9c50-453c-853b-6e0aec99e253",
"name": "Step 1 Lead Capture",
"type": "n8n-nodes-base.stickyNote",
"position": [
-12688,
-1008
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "74f8ae10-e7f2-4e1a-9531-a739a4e5d959",
"name": "Step 2 Validation",
"type": "n8n-nodes-base.stickyNote",
"position": [
-12144,
-1008
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "194d3889-9294-431f-9f03-f566cc571466",
"name": "Step 3 AI Analysis",
"type": "n8n-nodes-base.stickyNote",
"position": [
-11456,
-1008
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0e764902-30cd-4c49-9a85-a3c73cd96cc0",
"name": "Step 4 Response",
"type": "n8n-nodes-base.stickyNote",
"position": [
-10720,
-1008
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "ff8cb7c0-524e-423f-a530-faf5c6d9e0bc",
"name": "Step 5 CRM",
"type": "n8n-nodes-base.stickyNote",
"position": [
-10080,
-992
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "ffa2c510-2981-4b66-9c6c-81cb335bbe2e",
"name": "Step 6 Nurturing",
"type": "n8n-nodes-base.stickyNote",
"position": [
-12704,
224
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "193febc2-d220-4d8a-89af-e51158f2f022",
"name": "Step 7 Reports",
"type": "n8n-nodes-base.stickyNote",
"position": [
-12704,
640
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0a215bc2-8456-4f20-a808-69ccb7fbbb6b",
"name": "Error Handling",
"type": "n8n-nodes-base.stickyNote",
"position": [
-12704,
1056
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"connections": {
"Send Email": {
"main": [
[
{
"node": "Save/Update Lead",
"type": "main",
"index": 0
}
],
[
{
"node": "Save/Update Lead",
"type": "main",
"index": 0
}
]
]
},
"Is New Lead?": {
"main": [
[
{
"node": "Sheet - New Lead",
"type": "main",
"index": 0
}
],
[
{
"node": "Sheet - Update Lead",
"type": "main",
"index": 0
}
]
]
},
"Action Router": {
"main": [
[
{
"node": "Generate Response - Demo",
"type": "main",
"index": 0
}
],
[
{
"node": "Generate Response - Info",
"type": "main",
"index": 0
}
],
[
{
"node": "Create Call Task",
"type": "main",
"index": 0
}
],
[
{
"node": "Generate Response - Nurturing",
"type": "main",
"index": 0
}
],
[
{
"node": "Disqualify Lead",
"type": "main",
"index": 0
}
]
]
},
"Check History": {
"main": [
[
{
"node": "AI Analysis Engine",
"type": "main",
"index": 0
}
]
]
},
"Error Trigger": {
"main": [
[
{
"node": "Slack - Error Alert",
"type": "main",
"index": 0
}
]
]
},
"Gmail Trigger": {
"main": [
[
{
"node": "Normalize Input",
"type": "main",
"index": 0
}
]
]
},
"Notify Sales?": {
"main": [
[
{
"node": "Slack - Hot Lead Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "Done",
"type": "main",
"index": 0
}
]
]
},
"Is Valid Lead?": {
"main": [
[
{
"node": "Ignore",
"type": "main",
"index": 0
}
],
[
{
"node": "Find Existing Lead",
"type": "main",
"index": 0
}
]
]
},
"Disqualify Lead": {
"main": [
[
{
"node": "Save/Update Lead",
"type": "main",
"index": 0
}
]
]
},
"Log Interaction": {
"main": [
[
{
"node": "Notify Sales?",
"type": "main",
"index": 0
}
]
]
},
"Normalize Input": {
"main": [
[
{
"node": "Is Valid Lead?",
"type": "main",
"index": 0
}
]
]
},
"Create Call Task": {
"main": [
[
{
"node": "Slack - Call Task",
"type": "main",
"index": 0
}
]
]
},
"Read Report Data": {
"main": [
[
{
"node": "Calculate Metrics",
"type": "main",
"index": 0
}
]
]
},
"Save/Update Lead": {
"main": [
[
{
"node": "Is New Lead?",
"type": "main",
"index": 0
}
]
]
},
"Sheet - New Lead": {
"main": [
[
{
"node": "Log Interaction",
"type": "main",
"index": 0
}
]
]
},
"Calculate Metrics": {
"main": [
[
{
"node": "Slack - Weekly Report",
"type": "main",
"index": 0
}
]
]
},
"Slack - Call Task": {
"main": [
[
{
"node": "Save/Update Lead",
"type": "main",
"index": 0
}
]
]
},
"AI Analysis Engine": {
"main": [
[
{
"node": "Calculate Lead Score",
"type": "main",
"index": 0
}
]
]
},
"Find Existing Lead": {
"main": [
[
{
"node": "Check History",
"type": "main",
"index": 0
}
]
]
},
"Webhook - Web Form": {
"main": [
[
{
"node": "Normalize Input",
"type": "main",
"index": 0
}
]
]
},
"Leads for Nurturing": {
"main": [
[
{
"node": "Filter for Nurturing",
"type": "main",
"index": 0
}
]
]
},
"Sheet - Update Lead": {
"main": [
[
{
"node": "Log Interaction",
"type": "main",
"index": 0
}
]
]
},
"Calculate Lead Score": {
"main": [
[
{
"node": "Action Router",
"type": "main",
"index": 0
}
]
]
},
"Filter for Nurturing": {
"main": [
[
{
"node": "AI Nurturing Email",
"type": "main",
"index": 0
}
]
]
},
"Prepare Email - Demo": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
},
"Prepare Email - Info": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
},
"Weekly Report Trigger": {
"main": [
[
{
"node": "Read Report Data",
"type": "main",
"index": 0
}
]
]
},
"Auto Nurturing Trigger": {
"main": [
[
{
"node": "Leads for Nurturing",
"type": "main",
"index": 0
}
]
]
},
"Slack - Hot Lead Alert": {
"main": [
[
{
"node": "Done",
"type": "main",
"index": 0
}
]
]
},
"Generate Response - Demo": {
"main": [
[
{
"node": "Prepare Email - Demo",
"type": "main",
"index": 0
}
]
]
},
"Generate Response - Info": {
"main": [
[
{
"node": "Prepare Email - Info",
"type": "main",
"index": 0
}
]
]
},
"Prepare Email - Nurturing": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
},
"Webhook - WhatsApp/Telegram": {
"main": [
[
{
"node": "Normalize Input",
"type": "main",
"index": 0
}
]
]
},
"Generate Response - Nurturing": {
"main": [
[
{
"node": "Prepare Email - Nurturing",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Complete AI-powered sales system Automates lead capture, qualification, and follow-up from multiple channels. AI INTELLIGENCE:
Source: https://n8n.io/workflows/12082/ — 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.
LeadInboxTriageBot_GT. Uses gmailTrigger, openAi, googleSheets, gmail. Event-driven trigger; 36 nodes.
This workflow accepts construction work permit requests via webhook, logs them to Google Sheets, uses OpenAI (gpt-4o-mini) to detect conflicts against active permits, routes the request to a superviso
Overview
This workflow polls a Google Sheets milestone tracker every 15 minutes, calculates milestone-based invoice amounts, uses OpenAI (gpt-4o-mini) to draft invoice messaging, emails the invoice via Gmail w
Automate your entire invoice processing pipeline with AI-powered OCR, validation, and approval workflows 📄🤖. This n8n automation monitors incoming Gmail invoices, extracts structured data using OCR an