// guides · n8n error index

n8n error workflow + nightly backup: get alerts and never lose a workflow

Set up an n8n error workflow that posts failures to Discord in 5 minutes, then back up every workflow to git each night. Import-ready template, tested on n8n 2.x.

Updated 2026-10-16 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. Import the template

    Download n8n-error-alert-and-backup.n8n.json from the agent page. In n8n: Workflows → Import from file.

  2. Paste your Discord webhook

    Open Post to Discord and replace the URL. Prefer email or Telegram? Swap that node.

  3. Activate it, then link your workflows

    The error workflow must be Active. Then in each workflow: Settings → Error workflow → pick this one. Only production runs trigger it, so manual test runs won't.

  4. Turn on the nightly backup

    Create an API key under Settings → n8n API, add it as an n8n credential in Get all workflows, and create ~/.n8n-files once. n8n 2.x only writes files there.

  5. Want real version history? Use git

    The Python script exports all workflows as one file each, commits them, and pushes to a private GitHub repo: python3 n8n_backup_and_alert.py backup nightly. Add check every 10 minutes for alerts without the error workflow.

Alert never arrives?

An unpublished error workflow, Continue On Error, a retry that succeeded or a manual test run all stop it silently. We tested each one in n8n error workflow not triggering.

What the alert contains

The workflow name, the node that failed, the error message, a direct link to the failed execution, and the mode (webhook, trigger, schedule). That's usually enough to know whether to fix it now or after coffee.

What is (and isn't) in the backup

Every workflow's nodes, connections and settings. Credentials' secrets are never exported by the API, so you re-enter them after a restore. The backup files carry no API keys.

What an error workflow can't catch

It only fires when a run fails. If a workflow stops running altogether (deactivated, n8n down after a reboot), nothing fails and nothing alerts. Add a heartbeat for that: get an alert when a cron job or n8n workflow silently stops running.

Skip the setup: free download

The n8n error alert + backup agent does all of this. It's tested, MIT-licensed, and comes as an n8n workflow plus a Python script.

Get the free n8n error alert + backup agent → Or have us build yours →

FAQ

Why didn't my error workflow fire?

Usually it's not active, the failing workflow doesn't have it selected under Settings, or you tested with a manual run. Only production executions trigger it.

Does this work on n8n Cloud?

The alert does. File backups need self-hosted n8n, but the Python git backup works with Cloud's API.

How do I restore a workflow?

In n8n: Import from file, then pick the JSON from your backup repo, and re-attach credentials.

Related guides

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.