Skip to content
A2Z Skills
Topics
Search
ExplainerAutomation

n8n error workflows and the Error Trigger node

Ronit Karki

5 min read

Short answer

An n8n error workflow is a separate workflow starting with the Error Trigger node, which runs when another workflow execution fails. You attach it in Workflow Settings. It fires only for automatic executions: n8n documents that you cannot test one by running a workflow manually.

Researched explainer. Supporting documentation and research are linked in the article.

An error workflow is n8n’s answer to a question every automation eventually raises: who gets told when this breaks at three in the morning. It is an ordinary workflow that begins with the Error Trigger node, and n8n runs it when another workflow’s execution fails.

More automation explanations are in Automation. This one pairs with why automations fail silently, because the two cover opposite halves of the same problem: an error workflow handles the runs that fail, and that post handles the runs that do not.

How an error workflow is attached

n8n’s error handling documentation says that for each workflow you can set an error workflow in Workflow Settings, and that it runs if an execution fails. Two rules follow from the same pages: the error workflow must start with the Error Trigger, and one error workflow can serve several workflows.

The menu path is worth checking against your own version, because the documentation is not consistent about it. The error handling pages describe opening the workflow and selecting Options > Settings. The workflow settings page describes selecting the Workflow menu in the upper-right corner and then Settings, which opens the Workflow settings modal. In that modal the field is labelled Error Workflow (to notify when this one errors), described as selecting a workflow to trigger if the current workflow fails, while the error handling pages call the same field Error workflow.

What the Error Trigger actually receives

The Error Trigger documentation describes the node as getting details about the failed workflow and the errors when another linked workflow fails. Its default payload is an array with a single object, and knowing the field names is the difference between a useful alert and one that says “a workflow failed”.

Field What it holds
execution.id The failed execution’s identifier
execution.url A link to that execution
execution.retryOf The execution this one is a retry of
execution.error.message The error message
execution.error.stack The error stack
execution.lastNodeExecuted The node that ran last
execution.mode The execution mode
workflow.id The failed workflow’s identifier
workflow.name The failed workflow’s name

n8n says all of this information is always present, with stated exceptions. execution.id and execution.url need the execution to be saved in the database, and are absent when the error is in the main workflow’s trigger node. execution.retryOf appears only when the execution is a retry of a failed execution.

That first exception is the one that bites. An alert template that puts execution.url in the message produces a broken or empty link for exactly the class of failure where you most want to click through, so it is worth sending workflow.name alongside it rather than relying on the link alone.

A trigger-node failure sends a different shape

n8n documents a separate payload for errors in the trigger node, with less inside execution{} and more inside trigger{}. The fields it shows are trigger.error, carrying context, name with an example value of WorkflowActivationError, cause.message, cause.stack, timestamp, message and node, plus trigger.mode, workflow.id and workflow.name.

So an error workflow that reads execution.error.message unconditionally will find nothing for an activation failure. If one error workflow serves several production workflows, it has to handle both shapes.

Manual runs do not fire it, which makes testing awkward

The Error Trigger page is explicit: you cannot test error workflows when running workflows manually, and the Error Trigger only runs when an automatic workflow errors.

This is the single most common reason people conclude their error workflow is broken. Pressing execute and watching nothing happen is the documented behaviour, not a misconfiguration. Testing means letting a published workflow fail on its own schedule or its own webhook, which is slower and needs a deliberately broken step.

Stop And Error lets you decide what counts as failure

n8n’s Stop And Error node exists to display custom error messages, cause executions to fail under certain conditions, and send custom error information to error workflows.

It takes an Error Type parameter choosing between two operations. Error Message adds an Error Message field, described as the message you would like to throw. Error Object adds an Error Object field, described as a JSON object containing the error properties you would like to throw.

The object form is the more useful of the two for alerting, because it lets the failure carry structured context such as which record was being processed rather than a sentence somebody has to parse by eye.

This node is also what connects the two halves of the problem. An error workflow only runs when an execution fails, so a workflow that finishes cleanly while achieving nothing never reaches it. Stop And Error is how you turn a silent non-result into a real failure, by checking the result yourself and throwing when it is empty. The ways a run can look successful and be useless are set out in why automations fail silently, and the webhook-specific cases are in n8n webhook not working.

What the documentation leaves open

Three questions are not answered on the error handling, Error Trigger, Stop And Error or workflow settings pages:

  • What happens when the error workflow itself fails.
  • How errors inside sub-workflows are handled.
  • The current names and behaviour of node-level error options.

On the last point, the node-level settings that people often ask about by name do not appear on any of those four pages, so their current labels are worth reading off your own node panel rather than from a blog post. n8n does name errors in node settings and the workflow running out of memory as common sources of failure, and it documents the workflow settings modal as also carrying execution-order, execution-saving, timeout and redaction options, any of which changes what an error workflow can see after the fact. If Save failed production executions is off, there is no saved execution for execution.url to point at.

ShareHacker News

Did this fix it?

We re-test the guides that stop working. Telling us is the fastest way to get one fixed.

Questions people also ask

Can I test an error workflow by running the workflow manually?
No. n8n states that you cannot test error workflows when running workflows manually, and that the Error Trigger only runs when an automatic workflow errors. Testing therefore means letting a published workflow fail on its own trigger rather than pressing execute.
Do I have to publish a workflow that contains an Error Trigger?
No. The Error Trigger documentation says that if a workflow uses the Error Trigger node, you do not have to publish the workflow. It also notes that a workflow containing an Error Trigger uses itself as its error workflow by default.
Will an error workflow catch a run that succeeded but did nothing useful?
No. The error workflow runs if an execution fails. A run that completes without an execution error does not fail, so nothing fires even when the intended result never happened. That failure mode needs its own checks inside the workflow.
What happens if the error workflow itself fails?
The n8n error handling and Error Trigger pages do not cover this. Treat it as unspecified rather than assuming a retry or a second notification, and keep the error workflow simple enough that it has little to fail at.

Ronit KarkiAI and automation tester, A2Z Skills

I put real work through AI tools and automation platforms for A2Z Skills, then report what came back rather than what the marketing page promised. Every workflow I publish is one I have run end to end, including the part where it fails.

Join the guide notification list

Email delivery is not active yet. No sharing or selling your address.