Every n8n workflow fails eventually. An API times out, a token expires, a field arrives empty. Without n8n error handling in place, the run stops at the broken node and nobody hears about it.
Here's the catch most tutorials skip: the Error Trigger never fires on a run you start by hand. You can build a perfect alert, click Execute, watch a node turn red, and get no message at all.
This guide covers it layer by layer: Retry On Fail for flaky calls, the On Error setting for bad items, Stop and Error for business rules, and an error workflow that sends Slack or email alerts with a link to the failed run. Then the patterns that stop a retry from sending the same invoice twice.
If you're still choosing what to automate, my list of n8n workflow examples that actually ship is a good place to start.
Every setting below comes from n8n's official docs. Some links here are affiliate links. They don't change your price.

What does n8n do when a node fails?
When a node throws an error, n8n stops the execution at that node, marks the run as failed and saves it, if the workflow is set to save failed production executions. Nothing downstream runs. Nobody gets told.
That default is safe, but silent. Error handling in n8n is about adding three things on top of it: a second chance for temporary failures, a separate path for bad items, and an alert when a whole run dies.
n8n gives you one tool for each job. Most people only use one of them, which is how you end up with alerts for every rate-limit blip or a workflow that quietly skips half its items.
| Failure you expect | Tool in n8n | Where you set it |
|---|---|---|
| Timeouts, 429s, a flaky API | Retry On Fail (Max Tries, Wait Between Tries) | Node > Settings |
| One bad item in a batch | On Error: Continue (using error output) | Node > Settings |
| Data that is wrong but doesn't error | Stop and Error node after an If check | On the canvas |
| A run that fails for any reason | Error workflow with the Error Trigger | Workflow > Settings |
| Spotting patterns over time | Executions list, custom execution data | Executions tab |
My take: use all of these together. Retries absorb the noise, the error output handles items, and the error workflow catches whatever still gets through.
How do you retry a flaky node with Retry On Fail?
Retry On Fail tells a node to run again when it fails. n8n's docs describe it plainly: "When an execution fails, the node reruns until it succeeds", within the limits you set.
Open the node, go to the Settings tab and turn on Retry On Fail. Two fields appear:
- Max Tries: the maximum number of times n8n should try the node.
- Wait Between Tries (ms): the pause between attempts, in milliseconds. 1000 means one second.
n8n's docs don't publish the default values for these fields in the pages I checked, so set them deliberately rather than trusting whatever is pre-filled.

When is retrying the right call?
Retries fix failures that go away on their own: a timeout, a brief outage, a 429. For a 429, n8n shows the message "The service is receiving too many requests from you", and its rate-limit guide suggests setting Wait Between Tries above the API's limit. If an API allows one request per second, a wait of 1000 ms is the floor.
For steady rate limits, retries are only half the fix. The HTTP Request node also has a Batching option (Items per Batch and Batch Interval in ms), and any node can be paced with Loop Over Items plus a Wait node. Pacing prevents the 429. Retrying only reacts to it.
When does retrying make things worse?
Retries can't fix a wrong password, a 403, a missing field or invalid JSON. The node fails the same way every time, and you've only added delay before the failure.
Worse, retrying a node that creates records can create them twice if the first attempt half-succeeded. Turn Retry On Fail on for reads and idempotent writes first. For "create" calls, pair it with the duplicate checks later in this guide.
Which On Error setting should you pick?
The On Error setting, also under the node's Settings tab, decides what happens after a node fails for good, retries included. n8n gives you three options.
| On Error option | What n8n does | Use it when |
|---|---|---|
| Stop Workflow | Halts the whole execution at this node | The rest of the workflow is meaningless without this step |
| Continue | Moves to the next node using the last valid data | The step is optional, like an enrichment call |
| Continue (using error output) | Adds an Error output and sends failed items down it | You want to log, fix or alert on bad items while good ones carry on |
Stop Workflow is the only one of the three that fires your error workflow, because an error workflow runs when an execution fails. Pick Continue or the error output and the execution carries on instead of failing, even if some items didn't make it.
That trade-off matters. If you route errors to a branch, that branch has to do the alerting or logging itself.

How does the error output work?
When you pick Continue (using error output), the node grows a second output called Error. n8n introduced it in version 1.15.1, and the release notes say it's available on all nodes apart from sub-nodes and trigger nodes.
Items that succeed leave through the normal output. Items that fail leave through Error, carrying the error details with them. Connect that output to whatever should handle them: a Data Table or Google Sheets row, a Slack message, or a fallback API.
This is the setting I'd reach for in batch jobs. One malformed email address shouldn't stop the rest of the batch, and it shouldn't vanish without a trace either.
Is Continue ever a good idea?
Sometimes. Continue suits steps that are nice to have, like adding a company logo to a CRM record. Be careful with it on anything downstream depends on, because the next node receives the last valid data, not the result you expected. A silent Continue is how you end up with a report built on yesterday's numbers.
How do you set up an error workflow in n8n?
An error workflow is a separate workflow that n8n runs when another workflow's execution fails. It must start with the Error Trigger node, and one error workflow can serve as many workflows as you like.

Step 1: Create the error workflow
Create a new workflow and add the Error Trigger as the first node. Name it something obvious, like Error Handler, and save it.
You don't need to publish it. n8n's docs say a workflow that uses the Error Trigger doesn't have to be published to work.
Step 2: Attach it to the workflow you want to watch
Open the workflow you want to monitor. Open the workflow menu, select Settings, and pick your Error Handler in the setting called Error Workflow (to notify when this one errors). Save.
Repeat this for every production workflow. The setting lives on each workflow, so a workflow without it fails silently even when an error workflow exists.
One detail from the docs: a workflow that contains an Error Trigger uses itself as its error workflow by default.
Step 3: Know what data arrives
When a watched workflow fails, the Error Trigger receives one item that looks like this, according to n8n's docs:
Three fields are not always there. The execution ID and URL only exist when the execution was saved to the database. The retryOf field only appears when the failed run was itself a retry.
What changes when the trigger itself fails?
If the failure happens in the main workflow's trigger node, there is no execution to link to. The payload carries a trigger object instead, with an error name such as WorkflowActivationError, a timestamp and the node details. The mode is "trigger".
Build your alert so it still makes sense when the execution URL is missing. Otherwise your Slack message will contain a broken link exactly when you need it most.
How do you send n8n error alerts to Slack or email?
Add the alert nodes right after the Error Trigger. The Slack node's Message > Send operation posts to a channel, and the Send Email node sends through any SMTP account. Gmail and Telegram nodes work the same way.
A useful alert answers four questions: which workflow, which node, what error, and where to look. Here's a message template using n8n expressions on the Error Trigger's data:
For the trigger-failure case, add an If node after the Error Trigger that checks whether execution.url exists, and send a shorter message that uses the trigger error's message instead.
A few things I'd add to any alerting setup:
- Send alerts to a dedicated channel, not a busy team chat, so they don't get muted.
- Put the execution URL in every message. That link is the difference between a two-minute fix and a hunt.
- Don't alert on every retry. Let Retry On Fail absorb the noise and alert on the final failure only.
- Treat the error workflow like production code. If its Slack credential expires, every alert fails with it.
The execution URL points at your own n8n instance, so it only helps if the person reading the alert can open it. If you self-host n8n with Docker on a VPS, click one test alert's link from your phone before you rely on it.
How do you fail a workflow on purpose with Stop and Error?
Some of the worst failures don't throw errors. An API returns 200 with an empty list. A payment total comes back as zero. The run goes green and the damage is done.
The Stop and Error node fixes this. Put it after an If node that checks for the bad condition, and it forces the execution to fail, which triggers your error workflow.
It has one setting, Error Type, with two choices:
- Error Message: a plain text message, like "Order total is zero for order 1042".
- Error Object: a JSON object with whatever error properties you want to pass on.
The message you write shows up in the Error Trigger's execution.error.message, so your existing Slack alert carries it without changes. Write it for the person who reads it at 2 a.m.: what was wrong, and which record.
How do you test an error workflow if manual runs don't trigger it?
This is the step that trips most people up. n8n's docs are explicit: "You can't test error workflows when running workflows manually. The Error Trigger only runs when an automatic workflow errors."
So clicking Execute on a broken workflow won't send your alert. Test it in two parts instead.
Build the alert with mock data
While building, mock the payload. Add an Edit Fields or Code node that outputs the sample JSON above, pin its output, and wire your Slack or email node to it. Once the message looks right, swap the mock node for the Error Trigger. n8n's docs note that pinned data is for development only and isn't used in production executions.
Prove it end to end
Create a small test workflow with a Schedule Trigger or a Webhook trigger, followed by a Stop and Error node. Attach your error workflow in its settings and publish it. When the trigger fires on its own, the run fails and your alert should arrive. Then unpublish the test workflow.
A webhook makes this quick, since you can fire it on demand with one request. If webhooks are new to you, here's how webhooks work in plain English.
Which patterns stop failures from causing damage?
Alerts tell you something broke. These patterns make sure a failure, or a fix, doesn't break something else.
Make retries safe with idempotent writes
This is the part most guides never mention. When you retry a failed execution from the Executions list, n8n resumes from the saved state instead of starting over. Completed nodes keep their results. But the failed node gets its saved input again and processes every item, including the items it handled before it failed.
n8n's own example: a node that sent some messages before failing sends those messages again on retry.
The docs' advice is to use operations that update existing records instead of creating new ones, such as Append or Update Row in Google Sheets or Insert or Update in Postgres. Two more tools help:
- Data tables can store markers to prevent duplicate runs. The Data Table node has If row exists and If row does not exist operations for exactly this check.
- The Remove Duplicates node has an operation called Remove Items Processed in Previous Executions.
Also note: if the failed node is an Execute Sub-workflow node, a retry runs the whole sub-workflow again from the start (my n8n sub-workflows guide covers how those calls pass data). And each retry is a new execution, so retry the original or the failed retry, never both.
Log failed items somewhere you'll look
The error output is only useful if failed items land somewhere. A Data Table, a Google Sheet or a database table with the workflow name, the item's ID, the error message and a timestamp gives you a queue to work through. You can then re-run just those items later instead of replaying a whole execution.
Tag executions so you can find them
n8n lets you save custom data on each execution with the Execution Data node or the Code node, then filter the Executions list by it. Saving an order ID or customer email means you can find the failed run for a specific record in seconds.
In the Code node it's one line:
The limits: values must be strings, keys can be 50 characters, values 255 characters in the Code node (the Execution Data node allows 512 and truncates), and up to 10 items per execution. Custom execution data is available on n8n Cloud Pro and Enterprise, and on self-hosted Registered Community and Enterprise.
Keep the evidence
You can only retry or debug an execution n8n still has. In workflow settings, keep Save failed production executions on. If it's set to Do not save, there's nothing to retry.
Self-hosted instances also prune old executions by default. Per n8n's docs, finished executions are deleted after 336 hours (14 days) or once there are more than 10,000, whichever comes first. If you review failures weekly, that's fine. If you review monthly, change the limits.
For a failed run, open it from the Executions list and choose Debug in editor. n8n copies its data into the workflow and pins it to the first node, so you can fix the problem with the exact data that broke it. This is available on every n8n Cloud plan and on self-hosted Registered Community, Business and Enterprise.
What usually goes wrong with n8n error handling?
The same handful of mistakes show up again and again:
- The error workflow never fires during testing, because the test was a manual run.
- The error workflow exists, but the main workflow's Error Workflow setting was never set.
- A node set to Continue hides failures, so the run is green and the data is wrong.
- The alert has a broken link, because the failure was in the trigger node or the run wasn't saved.
- Retries hammer a rate-limited API with no wait, turning one 429 into five.
- A manual retry sends duplicate emails or creates duplicate rows, because the write wasn't idempotent.
- Sub-workflows with errors can't be called at all. n8n's docs note that if a sub-workflow contains errors, the parent workflow can't trigger it.
Fix the first two and you've covered most "why didn't I get an alert?" moments. If you're building with AI nodes, the same layers apply to the tool calls in my guide to building an AI agent in n8n.
How does n8n's error handling compare with other tools?
Most automation platforms offer retries and failure alerts in some form. What stands out in n8n is that each layer is visible on the canvas: the error output is a real branch, and the error workflow is a normal workflow you can extend with any node.
If you're weighing platforms, error handling is worth checking side by side. My n8n vs Make comparison covers how the two differ for builders, and my roundup of the best workflow automation tools looks at the wider field.
Frequently asked questions
Start small. Build one Error Handler workflow with a Slack or email alert, attach it to every production workflow, and turn on Retry On Fail for your HTTP calls. That alone covers most silent failures.
Then add the error output and duplicate checks to the workflows that write data, because those are the ones a retry can hurt.


