KEEP LEARNING
Build the bigger picture.
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
Tips > Reliability & Performance
Instead of building error handling into every workflow, create a single error handler workflow that receives all errors and routes notifications to the right
To centralize error handling in n8n, build one error handler workflow that starts with the Error Trigger node, then set it as the Error Workflow on every other workflow. The handler receives each failure, parses it, classifies severity, and routes notifications to Slack, email, or PagerDuty. Adding a new alert channel then means editing one workflow instead of dozens.
Instead of building error handling into every workflow, create a single error handler workflow that receives all errors and routes notifications to the right channels. Use the Error Trigger node as the starting point, then fan out to Slack, email, PagerDuty, or any alerting system.
Real-world example: A team runs 30 production workflows. Rather than adding Slack notification nodes to each one, they build one error handler that all workflows reference.
The Error Trigger node starts the handler. A Code node parses the incoming error and assigns a severity, then a Switch node routes each severity to the right channel:
Error Handler Workflow:
[Error Trigger] --> [Code: Parse Error] --> [Switch: Severity]
|
+---------+---------+
| | |
[Critical] [Warning] [Info]
| | |
[PagerDuty] [Slack] [Log to DB]
|
[Slack: #incidents]// Code node: "Parse Error and Determine Severity"
const errorData = $input.first().json;
const workflowName = errorData.workflow?.name || 'Unknown Workflow';
const errorMessage = errorData.execution?.error?.message || 'No error message';
const lastNode = errorData.execution?.lastNodeExecuted || 'Unknown node';
const executionId = errorData.execution?.id || 'N/A';
const executionUrl = errorData.execution?.url || '';
// Determine severity based on workflow name or error type
let severity = 'info';
const criticalWorkflows = ['Order Processing', 'Payment Handler', 'User Auth'];
const warningPatterns = ['rate limit', 'timeout', '503', '429'];
if (criticalWorkflows.some(w => workflowName.includes(w))) {
severity = 'critical';
} else if (warningPatterns.some(p => errorMessage.toLowerCase().includes(p))) {
severity = 'warning';
}
return [{
json: {
severity,
workflowName,
errorMessage,
lastNode,
executionId,
executionUrl,
timestamp: new Date().toISOString(),
slackMessage: [
`*Workflow Error [${severity.toUpperCase()}]*`,
`*Workflow:* ${workflowName}`,
`*Node:* ${lastNode}`,
`*Error:* ${errorMessage}`,
`*Execution:* <${executionUrl}|#${executionId}>`,
`*Time:* ${new Date().toISOString()}`
].join('\n')
}
}];Slack notification node configuration:
{
"resource": "message",
"operation": "post",
"channel": "#n8n-alerts",
"text": "={{ $json.slackMessage }}",
"otherOptions": {
"mrkdwn": true
}
}Point all 30 workflows to this single error handler in their settings. Now you have centralized alerting with severity routing, and adding a new notification channel (e.g., PagerDuty for critical errors) requires changing only one workflow.
Related: Use "Pin Data" to Freeze Node Output · Break Large Workflows into Sub-Workflows
KEEP LEARNING
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
APPLY IT TO YOUR SYSTEM
Bring the process, the tools involved and an example of where the current workflow gets stuck.