# Daily backup and sync of n8n workflows to GitHub via API
This automation ensures daily backup and synchronization of n8n workflows with a GitHub repository, eliminating manual configuration management. Ideal for teams using n8n within CI/CD pipelines or requiring reliable configuration protection.
## Who it´s for
- n8n developers who want automated workflow backups.
- DevOps engineers managing configurations in Git.
- n8n server administrators needing version control.
## What the automation does
- Runs daily at 23:59 via cron schedule.
- Fetches all workflows from a local n8n instance using the REST API.
- Retrieves workflow details and simultaneously downloads current JSON files from GitHub.
- Compares both datasets and detects changes.
- Creates or updates JSON files in the repository if differences are found.
- Commits changes with a timestamped message.
## What´s included
- Ready-to-use n8n workflow.
- Trigger and handler logic.
- Integrations with n8n instance and GitHub via REST API.
- Basic setup and adaptation guide.
## Requirements for setup
- Access to a running local n8n instance with API enabled.
- GitHub account with write permissions to the target repository.
- GitHub Personal Access Token.
- Configured environment variables in n8n (e.g., server URL, repo path).
## Benefits and outcomes
- Fully automated workflow backup without manual intervention.
- Disaster recovery through up-to-date configuration snapshots.
- Full version history tracking via Git.
- Integration into team CI/CD practices.
- Clear audit trail with timestamped commits.
- Reduced risk of configuration loss during updates or migrations.
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet