Skip to main content

n8n Error Trigger: The Complete Guide With a Ready Error Workflow

The n8n Error Trigger explained field by field: both payload shapes, why n8n 2.x needs the error workflow published, and an import-ready alert workflow.

Founder of IImagined.ai

Published
Oct 11, 2026
Reading time
11 min read
Quick answer

The n8n Error Trigger starts an error workflow whenever a production execution of a linked workflow fails, and hands it one item with the failed workflow, the error, the last node that ran and a link to the run. On n8n 2.x the error workflow must be published, even though the docs still say otherwise. This guide explains every field in both payload shapes, gives you an import-ready handler, and lists the seven reasons an Error Trigger stays silent.

The n8n Error Trigger is the node that starts an error workflow: when a production execution of a linked workflow fails, n8n runs the workflow that contains the Error Trigger and passes it one item describing the failure. That item holds the failed workflow's name and ID, the error message and stack, the last node that ran, the execution mode and, when the run was saved, a link straight to the failed execution.

Checked October 2026 against n8n's docs for the Error Trigger, error workflows, workflow settings and saving and publishing, and against the source code of n8n 2.42.6, the latest stable release on 9 October 2026. Where the docs and the code disagree, this guide says which is which.

This is the node-level reference in our n8n hub. Retries, On Error settings and backoff loops live in the wider n8n error handling guide. This page stays on the trigger itself: how it gets called, what every field in its output means, a handler you can import, and why it sometimes says nothing at all.

From a failed run to your alert
  1. 01
    A production run fails

    A node errors after its retries, or a Stop and Error node throws on purpose.

  2. 02
    n8n reads the workflow settings

    Error Workflow names the handler. With none set, a workflow that holds its own Error Trigger handles itself.

  3. 03
    The published handler loads

    n8n 2.x runs the published version of the error workflow, never the draft.

  4. 04
    Error Trigger outputs one item

    execution plus workflow, or trigger plus workflow when the trigger node failed.

  5. 05
    Your nodes alert a person

    Slack, email, Telegram, a ticket or a database row.

What is the n8n Error Trigger node?

The Error Trigger is a trigger node with no parameters. It does not poll or listen. n8n's execution engine calls it when another workflow's run fails, and a workflow can hold only one. Five behaviours define it:

  • It is linked from the failing side. You pick the handler in the failing workflow's Settings, under Error Workflow. One handler can serve any number of workflows.
  • A workflow can handle itself. The docs note that a workflow containing an Error Trigger uses itself as its error workflow by default.
  • Production runs only. The docs are blunt: "You can't test error workflows when running workflows manually." Only runs started by a schedule, webhook, app event or retry dispatch it.
  • The handler run is its own execution. n8n saves it under the handler workflow with the mode error, so the handler's Executions tab shows every alert that was attempted.
  • It is free to run. n8n's executions docs list error workflow executions among the runs that do not count toward a plan's quota.

How do you set up the n8n Error Trigger?

Build the handler once, publish it, then point each production workflow at it. Most of the work is deciding where alerts should land.

Wire an Error Trigger in six steps
  1. 1
    Create the handler

    New workflow, Error Trigger as the first node, named Error Handler. n8n saves the draft automatically. Expected result: a canvas with one trigger.

  2. 2
    Add the alert

    Connect a node that reaches a person: Slack, Send Email, Telegram, or an HTTP Request to a chat webhook. Expected result: Execute workflow runs the trigger with sample data and the alert arrives.

  3. 3
    Publish the handler

    Select Publish. n8n 2.x only runs the published version of an error workflow. Expected result: the button shows the workflow as published.

  4. 4
    Link each workflow

    In the workflow to protect: Workflow menu, Settings, Error Workflow, select Error Handler. Expected result: the setting shows the handler's name.

  5. 5
    Keep failed runs saved

    Leave Save failed production executions on. Expected result: execution.url opens a run you can debug and retry.

  6. 6
    Publish the linked workflow

    Only production runs dispatch the handler. Expected result: the next real failure produces an alert.

You can read this in the code. loadErrorWorkflowData in workflow-execution.service.ts returns nothing when the handler has no published version, and n8n's own validation service describes "the three ways a link silently never fires: the target is gone, unpublished, or has no Error Trigger". The same check has been in place since the 2.0.0 release.

What data does the n8n Error Trigger receive?

One item, in one of two shapes. When a node fails during a run, you get an execution object and a workflow object. This is n8n's documented example:

[
  {
    "execution": {
      "id": "231",
      "url": "https://n8n.example.com/execution/231",
      "retryOf": "34",
      "error": {
        "message": "Example Error Message",
        "stack": "Stacktrace"
      },
      "lastNodeExecuted": "Node With Error",
      "mode": "manual"
    },
    "workflow": {
      "id": "1",
      "name": "Example Workflow"
    }
  }
]

Here is every field, when it exists and what to do with it:

FieldPresentWhat it holdsUse it for
execution.idWhen a run failed (not for trigger failures)ID of the failed execution, as a stringDe-duplicate alerts and look the run up through the n8n API
execution.urlSame as execution.idLink to the failed run in the editorPut it last in the alert; it is the debug and retry button
execution.retryOfOnly when the failed run was a retryID of the execution that was retriedMute or downgrade repeat alerts for the same failure
execution.error.messageAlwaysThe error text n8n shows on the nodeLead the alert with it
execution.error.stackAlwaysThe stack traceStore it in a log; keep it out of chat messages
execution.lastNodeExecutedAlwaysName of the last node that ran, normally the one that failedTell the reader where to look
execution.modeAlwaysHow the failed run started, such as trigger, webhook or retrySeparate scheduled failures from webhook failures
workflow.idAlwaysID of the workflow that failedRoute by ID; names change
workflow.nameAlwaysName of the workflow that failedThe headline of the alert
trigger.errorOnly when the trigger node failedError object with name, message, timestamp, node, cause and contextFallback when execution is missing
trigger.modeOnly when the trigger node failedThe mode, shown as trigger in the docs exampleLabel the alert as a trigger failure

Four details the example does not show:

  • The real link is longer. In the 2.42.6 source, execute-error-workflow.ts builds execution.url as the instance base URL plus /workflow/<workflowId>/executions/<executionId>. Treat it as an opaque link and read IDs from execution.id and workflow.id, not from the URL.
  • The error object can carry more. The docs promise message and stack. n8n's error classes also define name (for example NodeApiError or NodeOperationError), description, timestamp, context, node and, on API errors, httpCode. None of these are documented for the Error Trigger, so read them with a fallback.
  • manual is sample data. A real payload never has that mode, because manual runs do not dispatch the handler. Expect trigger for schedules, polling and app events, webhook for Webhook calls, and retry when someone retried a failed run.
  • Newer builds add execution.executionContext. It is internal run metadata (a version, a start time, a source). It is not in the docs, so do not build alerts on it.

The second shape: when the trigger node itself fails

If the failure happens in the main workflow's trigger node, no execution exists yet. The docs say the item then has "less information in execution and more in trigger":

{
  "trigger": {
    "error": {
      "context": {},
      "name": "WorkflowActivationError",
      "cause": { "message": "", "stack": "" },
      "timestamp": 1654609328787,
      "message": "",
      "node": { }
    },
    "mode": "trigger"
  },
  "workflow": { "id": "", "name": "" }
}

This is the shape that breaks naive handlers. An alert that reads {{ $json.execution.error.message }} throws on a trigger failure, the handler run fails, and you hear nothing about the one error that stops a workflow from starting at all. Every handler should read both shapes, which is what the Code node in the template below does.

n8n error workflow template: import-ready JSON

This handler has three nodes: the Error Trigger, a Code node that turns both payload shapes into the same flat fields, and an HTTP Request node that posts the alert to a chat webhook. It needs no credential, so it works as soon as you paste one URL. Node types, versions and parameter names come from the n8n 2.42.6 source.

{
  "name": "Error Handler (webhook alert)",
  "nodes": [
    {
      "parameters": {},
      "id": "c3a8e4b1-0001-4e2d-9a3c-000000000001",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "const data = $input.first().json;\nconst run = data.execution ?? {};\nconst trig = data.trigger ?? {};\nconst error = run.error ?? trig.error ?? {};\n\nreturn [{\n  json: {\n    workflowName: data.workflow?.name ?? 'Unknown workflow',\n    workflowId: data.workflow?.id ?? '',\n    source: data.execution ? 'execution' : 'trigger',\n    failedNode: run.lastNodeExecuted ?? error.node?.name ?? 'Trigger node',\n    errorName: error.name ?? 'Error',\n    message: error.message || error.description || 'No error message',\n    mode: run.mode ?? trig.mode ?? '',\n    executionId: run.id ?? '',\n    executionUrl: run.url ?? '',\n    isRetry: Boolean(run.retryOf),\n  },\n}];"
      },
      "id": "c3a8e4b1-0002-4e2d-9a3c-000000000002",
      "name": "Normalise error",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://hooks.slack.com/services/REPLACE/WITH/YOUR-WEBHOOK",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{ $json.workflowName }} failed at {{ $json.failedNode }}\n{{ $json.errorName }}: {{ $json.message }}\nMode: {{ $json.mode }}{{ $json.isRetry ? ' (this run was a retry)' : '' }}\n{{ $json.executionUrl || 'No saved execution: check the trigger node' }}"
            }
          ]
        },
        "options": {}
      },
      "id": "c3a8e4b1-0003-4e2d-9a3c-000000000003",
      "name": "Send alert",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        0
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Normalise error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalise error": {
      "main": [
        [
          {
            "node": "Send alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
  1. Import it. Copy the JSON, open a new workflow and paste it onto the canvas (Ctrl+V or Cmd+V). The export and import docs also describe Import from File in the workflow menu.
  2. Set the URL. Open Send alert and replace the placeholder with your own. The body sends one field named text, which is what a Slack incoming webhook expects. Other chat tools use a different field name, so rename it to match theirs.
  3. Test the message. Select Execute workflow. The Error Trigger returns its sample item and the alert should arrive.
  4. Publish, then link. Publish the handler and select it as the Error Workflow in each workflow you want covered.

Two notes on the design. The alert node retries three times, two seconds apart, because a lost alert is the one failure nobody reports. And Slack's docs warn that a webhook URL contains a secret: anyone who can open the workflow can post to that channel. If that matters on your instance, swap the HTTP Request for the Slack or Send Email node, which keep the secret in a credential.

How do you test an n8n Error Trigger?

In two passes, because the sample data and a real failure prove different things. First, open the handler and run the Error Trigger with Execute step. In a manual run with no input, the node returns built-in sample data, which is enough to shape the message.

What each test proves
Execute step in the handler
  • Returns n8n's built-in sample item
  • execution.id is the number 231
  • mode is manual and the link is a placeholder
  • Proves your message formatting
A real production failure
  • Carries the real workflow name and failing node
  • execution.id is a string
  • mode is trigger, webhook or retry
  • Proves the link, the publishing and the permissions

Source: n8n 2.42.6 source, ErrorTrigger.node.ts

Second, cause a real failure without touching a real workflow:

  1. Create a workflow with a Schedule Trigger set to every minute, connected to a Stop and Error node with the message Error Trigger test.
  2. In its Settings, select your handler as the Error Workflow.
  3. Publish it and wait one minute. Expected result: an alert naming this workflow, the Stop and Error node and your message, with a working link.
  4. Unpublish and delete the test workflow.

If you need a different interval for the test, our n8n cron expression generator builds the expression. Webhook-started workflows are just as easy to break on purpose: call the production URL described in the n8n webhook guide with a payload your workflow rejects.

Why is the n8n Error Trigger not firing?

Almost always for one of seven reasons, and none of them show an error in the editor. Start with the handler's own Executions tab: an empty list means n8n never started it, and a failed run there means it started and was blocked or broke.

What you seeCauseFix
You run the workflow from the editor and nothing arrivesManual executions never start an error workflowPublish the workflow and let its real trigger start the failing run
A production run fails and the handler shows no executionThe handler has no published version (n8n 2.x)Publish the handler; publish again after every edit
The handler is published but still silentIts published version has no enabled Error TriggerEnable the node, then publish so the live version includes it
The handler shows a failed run: "tried to invoke this workflow to handle errors"Its "This workflow can be called by" setting blocks the caller, for example a workflow in another projectSet it to Any workflow or Selected workflows
The run is marked successful although a node brokeThat node's On Error is set to Continue, so the execution never failsUse Stop Workflow, or end the error branch with Stop and Error
A workflow with its own Error Trigger stopped alertingError Workflow was set back to No Workflow, stored as DEFAULTSelect an explicit handler in Settings
The alert link opens an empty pageFailed runs are not saved, or the base URL is wrongSave failed production executions; set N8N_EDITOR_BASE_URL

Two rows need a source. The permission block comes from the same caller policy that guards sub-workflows: its default only allows callers in the same project, and a blocked call is saved in the handler as a failed execution. The DEFAULT row is reported in issue 40824, open in October 2026: clearing the setting stores the literal value DEFAULT, and the dispatch code in 2.42.6 treats any stored value as a workflow ID, so the workflow's own Error Trigger is skipped.

An error workflow also cannot report what n8n never sees. If the instance is down or a schedule silently stops, there is no failed execution to dispatch. Watch the instance from outside as well; our n8n self-hosting guide covers the health checks.

One shared handler, or an Error Trigger in every workflow?

Use one shared handler for alerts, and add an Error Trigger inside a workflow only when that workflow needs its own cleanup. The shared handler is one place to change a channel, one thing to publish and one execution list to audit.

Where the Error Trigger should live
Shared Error Handler workflow
  • Selected under Error Workflow in each workflow
  • One alert format for the whole instance
  • Route by workflow.id with a Switch node
  • Must be published and callable by the failing workflow
Error Trigger inside the workflow
  • Runs by default when no Error Workflow is set
  • Fits cleanup that only this workflow needs
  • Published together with the workflow it protects
  • Easy to forget when you copy the workflow

Cleanup means work that belongs to one process: releasing a lock row, marking an order as failed, telling a customer their export did not finish. Alerts do not belong there. If these workflows are becoming a product people pay for, our AI SaaS Builder program covers the same discipline in application code: production error handling, rate limits and fallbacks for Claude API features.

Error Trigger pre-flight checklist

Before you trust the handler
  • The handler is published, and was published again after its last edit
  • The handler reads both shapes: execution and trigger
  • Every production workflow names the handler under Settings, Error Workflow
  • Save failed production executions is on, so the link opens a real run
  • Self-hosted: N8N_EDITOR_BASE_URL is your public address, so links do not point at localhost
  • The alert node has Retry On Fail turned on
  • The handler has its own backup error workflow
  • A scheduled Stop and Error test produced a real alert
  • Handlers in another project allow the caller under "This workflow can be called by"

Once this is in place, the plan your instance runs on matters less than you might expect, because handler runs are not billed; our n8n pricing guide explains what is.

n8n Error Trigger: FAQ

What is the Error Trigger in n8n?

The Error Trigger is the node that starts an error workflow. It has no settings and listens for nothing itself: when a production execution of a linked workflow fails, n8n runs the workflow that contains the Error Trigger and gives it one item with the failed workflow, the error, the last node that ran and a link to the execution. You then add nodes that alert a person.

Does an n8n error workflow need to be published?

On n8n 2.x, yes. The n8n docs still say a workflow that uses the Error Trigger does not have to be published, which matched n8n 1.x. Since version 2.0 the runtime loads the published version of the error workflow, and if there is none it writes a log line and sends nothing. Publish the handler, and publish again after each edit. Checked October 2026 against n8n 2.42.6.

What data does the n8n Error Trigger output?

One item. For a failure inside a run it has execution.id, execution.url, execution.error with message and stack, execution.lastNodeExecuted, execution.mode, execution.retryOf when the run was a retry, plus workflow.id and workflow.name. If the trigger node of the main workflow failed, there is no execution object: the details arrive under trigger.error and trigger.mode instead, with the same workflow object.

How do I test an n8n error workflow?

Use two tests. In the error workflow, run the Error Trigger with Execute step: in a manual run it returns built-in sample data, which is enough to build the alert message. Then create a throwaway workflow with a Schedule Trigger and a Stop and Error node, set its Error Workflow to your handler, publish both and wait for the schedule. Manual runs never start an error workflow.

Why is my n8n Error Trigger not firing?

The usual causes are a manual test run, an error workflow that was never published or was edited without publishing again, a failing node set to Continue so the execution never counts as failed, or an error workflow in another project whose "This workflow can be called by" setting blocks the caller. Check the error workflow's own Executions tab: a blocked call is saved there as a failed run.

Can one error workflow handle several n8n workflows?

Yes. The n8n docs say you can use the same error workflow for multiple workflows. Select it under Error Workflow in the settings of each workflow you want covered. The payload carries workflow.id and workflow.name, so one handler can route alerts to different channels or people with a Switch node, which is easier to maintain than a separate Error Trigger in every workflow.

Do error workflow runs count toward n8n execution limits?

No. The n8n docs on executions list error workflow executions among the runs that do not count toward a paid plan's execution quota, together with manual executions and sub-workflow executions. Only production executions started by triggers, schedules or polling count. An error workflow on every production workflow therefore adds no quota cost. Checked October 2026.

All Access · all four programs · $99/mo

Your workflows now tell you when they break. Next, build the thing they power.

AI SaaS Builder, included in All Access, takes you from automations to a shipped product: Supabase and Next.js, Claude API features with production error handling, Claude Code and MCP, and Stripe billing. All Access adds the other three programs, live coaching and the private community.

Start All Access — $99/mo →30-day money-back guarantee
Free · no signup

Start with the free Creator Starter Kit

Templates and checklists for your first automations, plus the free cron generator for the scheduled test above.