Run a workflow when any other workflow fails

Describe the issue/error/question

I have several CRON jobs that run daily (AKA set and forget) but sometimes they’ll fail and I won’t know for a while if it’s a lower priority CRON job - it would be nice to get notified when that happens so that I can investigate (recently had this happen with some API keys that were invalidated)

What I would like to happen

It would be great if I could somehow catch the workflow failing in n8n (maybe a webhook via the n8n API? or maybe a CRON that goes through the n8n API logs looking for errors?) and then kick off a message that contained: the workflow URL / ID, last executed node, error messages (if any) - that way services that fail for any reason can be remedied quickly (feel like this is a critical feature if you start relying on n8n more)

The Question

Any ideas on how to pull this off inside of n8n?

1 Like

Tagging some friendly people in n8n

@jan @viraj @harshil1712

Hey @chrisgereina,

No need to tag we all see the messages during our work hours :slightly_smiling_face:

It sounds like what you might be after is the error workflow, this can be set per workflow and will automatically trigger on any workflow error.

We have a handy tutorial on our blog here: Creating error workflows in n8n – n8n Blog

There is also a bit of documentation about it here: Error handling - n8n Documentation

3 Likes