There is nothing worse than discovering an automation stopped running three days ago because of an expired API token. To prevent silent failures, I configured a centralized Error Trigger workflow in n8n.
How Error Triggers Work in n8n
In workflow settings, you can designate an Error Workflow. Whenever any node crashes, n8n invokes this handler and passes execution metadata, including the failed node name and error stack trace.
{
"nodes": [
{
"parameters": {},
"name": "Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"typeVersion": 1,
"position": [240, 300]
},
{
"parameters": {
"webhookUri": "https://discord.com/api/webhooks/...",
"text": "=⚠️ **n8n Workflow Failed!**\nWorkflow: {{$json.workflow.name}}\nNode: {{$json.execution.error.node.name}}\nReason: {{$json.execution.error.message}}"
},
"name": "Send Discord Alert",
"type": "n8n-nodes-base.discord",
"typeVersion": 2,
"position": [460, 300]
}
]
}
Now, whenever an API changes or a rate-limit hits, my phone pings immediately with the exact node that broke.