I Lost a Working n8n Workflow to a Bad Edit — Now Git Versions Every Deploy
I Lost a Working n8n Workflow to a Bad Edit — Now Git Versions Every Deploy Part of my build-in-public series on running LLM workflows in n8n in production. This one is about the infrastructure nobody brags about: version control. n8n has no git. I added it myself — a nightly exporter that snapshots every workflow into a git repo, so a bad edit is a git checkout instead of a 40-minute guessing…
A reporter recounts a story about how a seemingly minor edit to a client's inbox triage workflow in n8n resulted in a disastrous outcome. Unaware of the changes made, the client woke up to 200 un-triaged emails. The reporter realized the importance of version control for n8n workflows and created a meta-workflow that backs up all other workflows to a git repository every night.
This export process removes unnecessary data, ensures changes are minimal, and tracks the workflow's history with git. The reporter also explains the importance of rules for maintaining the repository, including not editing workflows directly, keeping credentials out of the repository, and documenting n8n upgrades as separate commits.
The reporter emphasizes that backups without the ability to restore are useless and demonstrates how monthly restores of previous workflow versions have caught two real problems.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.