Offices in Islamabad, Rawalpindi and Lahore. Clients in the US, UK, Europe, Canada, the UAE and Pakistan.

1920 Agency Get a proposal

Services

Online adsSEOSocial media managementVideo editingWebsitesAI and automationGoHighLevel setup

Free tools

Website project plannerAd budget calculatorAutomation ROI calculatorBreak-even ROAS calculatorCost per lead calculatorMarketing budget calculatorSEO ROI calculatorAll free tools

Company

WorkGuidesAbout Get a proposal

+92 335 5089212 · info@1920agency.com

AI automation · 8 min read

n8n Error Handling: How to Know When an Automation Fails

The short answer: To get an alert when an n8n automation fails, build a separate workflow that starts with the Error Trigger node, send its message to a channel someone reads, and select it under Options > Settings > Error workflow in every workflow you want covered. That only catches runs that fail. A schedule that never fires, or a run that succeeds with nothing to do, raises no error, so add a heartbeat check that alerts on silence.

Run your own numbers: free automation ROI calculator

n8n Error Handling: How to Know When an Automation Fails
On this page
  1. How do you get an alert when an n8n automation fails?
  2. What does the Error Trigger actually tell you?
  3. Why did your error workflow not fire?
  4. What about failures that raise no error?
  5. What should the alert message say, and who gets it?
  6. Which setting does what? A quick map
  7. Does self-hosting change this?
  8. Who sets this up?
  9. Frequently asked questions
  10. Sources

How do you get an alert when an n8n automation fails?

You need two things: an error workflow that sends the alert, and a setting in each workflow that points to it. n8n's error handling documentation describes the steps.

  1. Create a new workflow whose first node is the Error Trigger. Name it something obvious, such as "Error alert".
  2. After the trigger, add a node that tells a person: a message to a team channel, or an email. Put the workflow name, the error message and the last node that ran in the text.
  3. Save and publish it. The Error Trigger page says the workflow containing it must be published.
  4. Open each workflow you want covered, go to Options > Settings, pick the error workflow in the field labelled "Error Workflow (to notify when this one errors)", and save (workflow settings).

One error workflow can serve many workflows, which is how a small business should run it: one alert, one place to look. The catch is step 4. Nothing is covered automatically, so a workflow someone builds next month has no alert until that setting is chosen. Put it on the checklist for every new workflow.

If your automations are the kind that route leads or send invoices, an unseen failure costs money, which is why what to automate first lists failure alerts among the steps for the first automation.

What does the Error Trigger actually tell you?

For a normal failure it passes the failed workflow's id and name, plus an execution object with the error message and stack, the lastNodeExecuted, the mode (how the run started) and, if available, an execution id and url.

Field Use it for Catch
workflow.name Saying which automation failed None
execution.error.message The reason in plain words Can be technical
execution.lastNodeExecuted Where to look first Names are whatever the builder typed
execution.url One-click link to the run Only present if the execution was saved
execution.retryOf Telling a retry from a first failure Only present on retries
trigger object Errors when the trigger node itself fails Replaces the execution ID and link

The last two rows matter. n8n's docs say the execution ID and URL are missing when the error happens in the main workflow's trigger node, because the workflow never executed, and that the ID "requires the execution to be saved in the database". So switch on "Save failed production executions" and write alert text that still makes sense when the link is empty.

Why did your error workflow not fire?

Three documented reasons cover most cases.

  • You tested it by hand. The Error Trigger page says it fires when an automatic run fails and that you cannot test error workflows when running workflows manually. To test, publish a small workflow with a Stop And Error node on a schedule and let it run.
  • It is not published. The workflow containing the Error Trigger has to be published.
  • The setting was never chosen. The error workflow runs only for workflows that select it. A workflow that itself contains an Error Trigger uses itself as its error workflow by default, per the same page.

What about failures that raise no error?

This is the part most tutorials skip, and it is where small businesses actually lose leads. The Error Trigger answers "did a run fail?". It cannot answer "did a run happen?" or "did the run do anything?".

Three silent cases we plan for:

  1. The schedule never fires. n8n's Schedule Trigger documentation says the workflow must be saved and published for the trigger to run. It also says that by default missed executions are discarded ("Don't Run Missed Executions"), with options to run one catch-up instead, and that with the in-memory scheduler (N8N_SCHEDULER_ENABLED=false) missed executions never run. If the instance was down at 9 a.m., the 9 a.m. run is simply gone and no error exists.
  2. The timezone is not what you think. The same page says the node uses the workflow's timezone if set, otherwise the instance timezone, which defaults to America/New York on self-hosted and GMT on n8n Cloud when the owner's timezone is not detected. A "9 a.m." job can run hours off for a business in Islamabad or London.
  3. The run succeeds on nothing. A lead sync that finds zero new leads for three weeks looks identical to a broken connection. The workflow is green either way.

Add a heartbeat

The fix is to invert the alert. Instead of waiting for a failure message, expect a success signal and raise the alarm when it is missing.

  • At the end of the workflow, send a small request to a heartbeat or cron-monitoring service, or write a timestamp somewhere you can check. Name the service you use in your own documentation; the pattern is the same with any of them.
  • Set the monitor to alert if no signal arrives within the expected window plus some slack.
  • For "ran but did nothing", add a check before the end: if the count of processed items is zero when you normally expect some, send it to a Stop And Error node so it becomes a real failure. The Stop And Error node can throw an Error Message or an Error Object and sends the details to the error workflow.

Choose thresholds from your own volume. A clinic with 20 enquiries a day can alert on one empty day; a business with 3 a week cannot. We do not publish a universal number because one does not exist.

What should the alert message say, and who gets it?

An alert nobody reads is the same as no alert. Rules we apply:

  • Send it where work already happens, a shared channel or a monitored inbox, not one person's email. If that person is on leave the alert should not disappear.
  • Name an owner. Write who responds in the workflow's description.
  • Say what the business impact is, not only the technical error: "Lead-to-CRM sync failed; new enquiries are not being logged" is actionable; "Request failed with status code 401" is not.
  • Do not alert on everything. If the channel fills with noise, people mute it. Page for failures that lose money or customers; batch the rest into a daily summary.

Which setting does what? A quick map

Situation Tool Result
A run fails Error workflow with Error Trigger Alert with error details
A run is slow or stuck "Timeout Workflow" setting Cancels the execution after a set time (settings)
A run finishes but the result is wrong Stop And Error after a check Becomes a failure and triggers the alert
A run never starts Heartbeat monitor outside n8n Alert on silence
You need to investigate later Save failed production executions Run is kept and the alert can link to it

Does self-hosting change this?

It changes who is responsible, not the mechanics. On n8n Cloud the instance is n8n's to keep running; self-hosted, the server going down is a failure the error workflow cannot report, because the workflow engine that would send the alert is the thing that is down. That is another reason the heartbeat should live outside n8n. We cover the trade-offs in n8n Cloud vs self-hosted, and how n8n counts executions in n8n vs Make vs Zapier. If you are weighing a build against a hosted CRM's built-in automations, see GoHighLevel vs n8n.

Who sets this up?

A competent in-house person can do the error workflow in an afternoon. The heartbeat and the "ran but did nothing" checks take more thought because they depend on what normal looks like for your business. Our AI automation service includes monitoring in the build: 1920 Agency runs its own operations on automation, with daily checks that report to team channels, and an unmonitored workflow is not something we hand over. What it costs depends on the number of workflows and the systems they touch; see automation agency cost for sourced market figures, and we quote after mapping the job.

Frequently asked questions

How do I get notified when an n8n workflow fails?

Create a workflow whose first node is the Error Trigger, add a node that sends you a message, and save it. Then open the workflow you want to watch, go to Options > Settings, choose the error workflow and save. n8n's docs say the error workflow runs if an execution fails.

Why did my error workflow not run when I tested it?

n8n's Error Trigger page says it only fires when an automatic run fails and that you cannot test error workflows by running workflows manually. Use a published workflow with a Stop And Error node and let it run from its real trigger.

Can one error workflow cover all my workflows?

Yes. n8n's docs say one error workflow can be used by several workflows. Each monitored workflow still has to select it in its own settings, so a new workflow is not covered until you do.

What does the Error Trigger tell me about the failure?

It passes the workflow name and ID, the error message and stack, the last node that ran, how the run started and, when the execution was saved, an execution ID and link. If the trigger node itself fails, the execution ID and link are missing and a trigger object carries the error.

Does n8n alert me when a scheduled workflow does not run?

Not through the Error Trigger, because nothing failed. n8n's Schedule Trigger page says the workflow must be published and, by default, missed executions are discarded. Use a heartbeat check outside the workflow that alerts when an expected signal does not arrive.

What is the Stop And Error node for?

It makes an execution fail on purpose, with a custom message or a JSON error object, and passes that to the error workflow. Use it when a run finishes technically fine but the result is wrong, such as an empty lead list.

Should failed runs be saved?

Yes. n8n has a setting to save failed production executions, and the execution link in the alert is only present if the execution was saved to the database. Keep it on for any workflow you rely on.

Sources