Skip to content

Instantly share code, notes, and snippets.

@TravnikovDev
Created November 12, 2025 21:54
Show Gist options
  • Select an option

  • Save TravnikovDev/af8983c62a54f880ca047216f5b60286 to your computer and use it in GitHub Desktop.

Select an option

Save TravnikovDev/af8983c62a54f880ca047216f5b60286 to your computer and use it in GitHub Desktop.
LinkedIn Post - 2025-11-12 16:54

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. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment