Tips > Reliability & Performance

Build a Centralized Error Notification System with the Error Trigger Node

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.

What is a centralized error notification system?

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.

How do you route and classify errors in the handler?

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
  }
}

How do you connect every workflow to the handler?

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

Showcase builds

19 complete workflows from my own projects, each with its n8n workflow JSON to import. Showcase entries link the file at the end of the article.

See the showcase builds

Keep reading

190 entries grouped by topic, from first workflow to queue mode. Free, no signup.

Browse the encyclopedia

Need it built?

I design, build and run n8n systems for clients. Every engagement starts with a $1,500 diagnostic audit, credited toward the build.

Book an introductory call