n8n workflow failed: reading the error, retrying and getting an alert

When an n8n workflow fails, the executions list shows which one and at what node. From there you have three tools to make it robust: retrying on the node, deciding what to do on error, and an error workflow that sends you a notice. n8n is third-party software running on your VPS; the exact screen names depend on the version, so confirm in the project’s documentation.

First, read the error

1 Open the executions list and find the one marked as failed. Open it.
2 Find the red node. It is the one that failed. The nodes before it ran fine.
3 Read the message and the data that went into that node. It nearly always explains: an empty field, a refused credential, a request that took too long.
4 Reproduce it with the same data. You can run just that node, to test the fix without repeating the whole workflow.

The three defences

Defence What it is for When to use it
Retry on fail (in the node’s settings) Tries the same node again a few times, with a pause between tries. Passing failures: a slow network, a busy API, a request limit.
What to do on error (in the node’s settings) Stop the workflow, or carry on with the rest of the data and handle the error separately. When an error on one row should not stop the others.
Error workflow A separate workflow, with the error trigger, that runs when another one fails. To get the notice: e-mail, message, a row in a sheet.

Building the alert

1 Create a new workflow that starts with the error trigger. Then add a node that sends you a message (e-mail or Telegram). See alerts to Telegram.
2 Put in the notice the name of the workflow that failed, the node, the error message and the time.
3 In the settings of each important workflow, choose that workflow as the error workflow. Link it to all of them, or the ones you miss fail silently.
4 Cause a failure on purpose in a test workflow and see whether the notice arrives.
Retrying is not for everything. If the node sends a message or creates an order, retrying can duplicate the effect: the customer gets it twice. On those nodes, retry only if the service accepts an identifier that prevents duplicates, or handle the error by hand.

If n8n stops answering or restarts by itself, the problem may not be the workflow: see n8n running out of memory: the causes. If the trigger never fires, see n8n webhooks: test URL, production URL, and why they do not fire.

Clear old executions. They keep the data that passed through, and that fills the disk and holds customer data longer than you need. Set how long you keep them.

Need a server for your workflows? See the VPS plans.

See the VPS servers

SEE ALSO

n8n running out of memory: the causes

n8n webhooks: test URL, production URL, and why they do not fire

Securing n8n: access, credentials and exposed webhooks

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?