If it’s not in Git, it didn’t happen.
I run a bunch of n8n automations for clients. One server hiccup nuked a workflow last year and I had to rebuild from memory. Never again.
Now I back up every n8n workflow to GitHub using the official template workflow. It calls the n8n API, exports all workflows as JSON, then commits them to a repo on a schedule.
What gets persisted: every workflow definition - nodes, connections, triggers, settings, tags, active flag - one JSON per workflow. What doesn’t: credentials and execution history. That’s exactly what you want.
Setup is simple: create a private repo, generate a GitHub token with repo scope, add it to n8n credentials, import the template, point it at your repo. I group files by tags and use timestamped commit messages.
The win is active Git history. You can diff a node change, roll back a bad edit, branch and PR workflow updates like code. Schedule it daily with a Cron node and forget about it.
One note on safety: keep secrets in n8n credentials, not in the repo. If you want docs, have the workflow auto-update a README.
Backups are boring until you lose a day to a missing node. Put your automations under version control and buy yourself sleep. 🚀