Back Up n8n Workflows to GitHub: Deterministic JSON Exports
Back Up n8n Workflows to GitHub: Deterministic JSON Exports
Regular price
£62.99
Regular price
£62.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Back Up n8n Workflows to GitHub: Deterministic JSON Exports
Regular price
£62.99
Regular price
£62.99
Sale price
Unit price
/
per
Back up your n8n workflows to GitHub—deterministic JSON exports with no noisy commits
This n8n automation runs daily to export all your n8n workflows, converts them into deterministic JSON files, and pushes updates to GitHub only when the exported content truly changes—so your repository stays clean and trustworthy.
What this workflow does
- Schedules automatically: runs every day at 03:05 (or any schedule you set).
- Pulls every workflow from your n8n instance via the n8n API, including archived workflows.
- Normalizes exports to deterministic JSON by stripping volatile fields and sorting JSON keys.
- Organizes archived workflows separately and generates a README inventory.
- Builds a single Git tree containing every workflow file.
- Prevents leftovers: marks orphaned exports for deletion so renamed or deleted workflows don’t remain in the backup.
- Commits only when needed: reads the current GitHub branch state (reference, commit, repository tree) and creates a new commit only if the newly built tree differs.
Use cases
- Audit and compliance: maintain a versioned record of workflow changes over time.
- Disaster recovery: quickly restore or compare n8n workflow definitions by pulling from GitHub.
- Safe refactoring: verify that updates truly modify workflow content—without flooding commits.
- SaaS operations: track changes across environments by backing up workflow definitions regularly.
Technical details
- Nodes/logic used: Schedule Trigger, n8n (workflow/API retrieval), Code (deterministic JSON normalization and comparison), plus HTTP Request for GitHub operations.
- GitHub integration: uses the Git Data API via HTTP Request nodes to read branch/tree state and create commits.
- Credentials: a fine-grained GitHub token (Contents read/write) and an n8n API key for the List workflows step.
- Implementation elements include if logic to control commit behavior and optional sticky note for setup clarity.
