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": {
"versionId": "1.0.0",
"createdAt": "2025-09-29T07:07:44.456454",
"updatedAt": "2025-09-29T07:07:44.456470",
"owner": "n8n-user",
"license": "MIT",
"category": "automation",
"status": "active",
"priority": "high",
"environment": "production"
},
"nodes": [
{
"id": "d46a710d-0d0e-4040-b2b2-a2bd2e2410ff",
"name": "Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"position": [
440,
520
],
"parameters": {},
"typeVersion": 1,
"notes": "This errorTrigger node performs automated tasks as part of the workflow."
},
{
"id": "2e3a9cf6-9a9f-4f11-ab53-e3fa9c393e1f",
"name": "n8n",
"type": "n8n-nodes-base.n8n",
"position": [
900,
180
],
"parameters": {
"filters": {},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"name": "<your credential>"
}
},
"typeVersion": 1,
"notes": "This n8n node performs automated tasks as part of the workflow."
},
{
"id": "7fc93f47-24ee-4000-ac3f-eb2746a926bb",
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"position": [
660,
520
],
"parameters": {
"sendTo": "=(your email address)",
"message": "={{ $json.execution.url }}",
"options": {},
"subject": "=[n8n] workflow failed: {{ $json.workflow.name }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1,
"notes": "This gmail node performs automated tasks as part of the workflow."
},
{
"id": "25ed8ec8-2c28-498a-a951-c5ef1b2a2c59",
"name": "get error handler",
"type": "n8n-nodes-base.n8n",
"position": [
660,
180
],
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"name": "<your credential>"
}
},
"typeVersion": 1,
"notes": "This n8n node performs automated tasks as part of the workflow."
},
{
"id": "44713be9-786a-4bff-b562-a23146792995",
"name": "n8n | update",
"type": "n8n-nodes-base.n8n",
"position": [
1500,
180
],
"parameters": {
"operation": "update",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"requestOptions": {},
"workflowObject": "={{ JSON.stringify($json) }}"
},
"credentials": {
"n8nApi": {
"name": "<your credential>"
}
},
"typeVersion": 1,
"notes": "This n8n node performs automated tasks as part of the workflow."
},
{
"id": "be27247a-71e5-4204-9c7c-2692d8a82c8b",
"name": "set fields",
"type": "n8n-nodes-base.code",
"position": [
1300,
180
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const data = $json\n\ndata.settings.errorWorkflow = $('get error handler').item.json.id ;\ndelete data.settings.callerPolicy;\n\nreturn {\n id: data.id,\n name: data.name,\n nodes: data.nodes,\n connections: data.connections,\n settings: data.settings\n}"
},
"typeVersion": 2,
"notes": "This code node performs automated tasks as part of the workflow."
},
{
"id": "d8774911-f4b2-4198-838b-2d0b89002e25",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
400
],
"parameters": {
"width": 483.4744075807993,
"height": 308.64949804469416,
"content": "## Default Error Handler\n\nUpdate this to your preferred notification mechanism"
},
"typeVersion": 1,
"notes": "This stickyNote node performs automated tasks as part of the workflow."
},
{
"id": "0baa0fc3-4d5e-4507-bd5d-65ebce68178f",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
605.0603083429507,
126.84319830832769
],
"parameters": {
"width": 232.91556831986873,
"height": 216.67545344104974,
"content": "get ID of self"
},
"typeVersion": 1,
"notes": "This stickyNote node performs automated tasks as part of the workflow."
},
{
"id": "fabb0db7-7364-4349-8563-952c9f0e07b2",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
440,
180
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2,
"notes": "This scheduleTrigger node performs automated tasks as part of the workflow."
},
{
"id": "dd1e0036-1093-4160-adad-ed1b0c1b3548",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
125.83113663973751
],
"parameters": {
"width": 214.6984582852457,
"height": 219.7116384468202,
"content": "Runs every day at midnight to update new workflows"
},
"typeVersion": 1,
"notes": "This stickyNote node performs automated tasks as part of the workflow."
},
{
"id": "aca838c8-ff3e-4630-824b-a6d1d8414326",
"name": "active && no error handler set && not this handler workflow",
"type": "n8n-nodes-base.if",
"position": [
1100,
180
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "290fd302-4e2d-44d6-8a8a-14a0b8f2c360",
"operator": {
"type": "string",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $json.settings.errorWorkflow }}",
"rightValue": "=Default Error Handler"
},
{
"id": "2a5799e9-2030-4281-bf11-e7f9777906c5",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.id }}",
"rightValue": "={{ $('get error handler').item.json.id }}"
},
{
"id": "8bc4c2a0-e094-4426-8ae6-71b6e4fa9842",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.active }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2,
"notes": "This if node performs automated tasks as part of the workflow."
},
{
"id": "error-22aa00e2",
"name": "Error Handler",
"type": "n8n-nodes-base.stopAndError",
"typeVersion": 1,
"position": [
1000,
400
],
"parameters": {
"message": "Workflow execution error",
"options": {}
}
}
],
"connections": {},
"name": "Errortrigger Workflow",
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true,
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": null,
"timezone": "UTC",
"executionTimeout": 3600,
"maxExecutions": 1000,
"retryOnFail": true,
"retryCount": 3,
"retryDelay": 1000
},
"description": "Automated workflow: Errortrigger Workflow. This workflow integrates 7 different services: stickyNote, code, scheduleTrigger, n8n, errorTrigger. It contains 11 nodes and follows best practices for error handling and security.",
"notes": "Excellent quality workflow: Errortrigger Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation.",
"id": "wf371641f59983"
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2n8nApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Errortrigger Workflow. Uses errorTrigger, n8n, gmail, stopAndError. Event-driven trigger; 12 nodes.
Source: https://github.com/basictechorg/n8n-productivity/blob/main/workflows/email-automation/0518_Error_Code_Update_Scheduled.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.
In any automated environment, n8n workflows, while powerful, can sometimes encounter unexpected issues or fail during execution. Without a dedicated error handling strategy, these failures might go un
Attach A Default Error Handler To All Active Workflows. Uses errorTrigger, n8n, gmail, stickyNote. Event-driven trigger; 11 nodes.
How it works:
Categories: Payments, Project Operations, Client Onboarding
Googlesheets Workflow. Uses googleSheets, gmail, executeWorkflowTrigger, stopAndError. Event-driven trigger; 33 nodes.