N8N Workflow Auto Backup and Version Management
This workflow is designed to automatically back up and manage workflow versions. By comparing with the GitHub code repository, it promptly identifies changes in the workflow status and automatically updates or creates backup files. It supports scheduled execution and manual triggering, ensuring the timeliness and completeness of backups. This is suitable for DevOps teams and automated operation and maintenance environments, effectively reducing the risk of workflow loss or version confusion, while enhancing team collaboration efficiency and management standardization.

Workflow Name
N8N Workflow Auto Backup and Version Management
Key Features and Highlights
This workflow automatically retrieves all workflow information from the local n8n platform and compares each workflow file with the corresponding backup files in a GitHub repository. It determines the workflow status (identical, different, or new) and automatically synchronizes updates or creates backup files accordingly. Supports both scheduled execution and manual triggering to ensure timely and complete workflow backups.
Core Problems Addressed
- Automates version control management of n8n workflows, preventing manual backup omissions or version confusion.
- Quickly detects workflow changes and precisely updates backup files in GitHub.
- Centralizes management of multiple workflows, enhancing team collaboration efficiency and standardizing workflow maintenance.
Application Scenarios
- Version management and backup of automated workflows for DevOps teams.
- Regular backup and auditing of workflow configurations in automated operations.
- Ensuring consistency and traceability of workflow configurations in multi-user collaborative environments.
Main Process Steps
- Trigger Methods: Supports scheduled trigger (daily at 20:11) and manual trigger.
- Global Configuration: Set GitHub repository details (owner, repository name, path).
- Fetch Local Workflow List: Retrieve all n8n workflow data via HTTP request API.
- Split Processing: Split the workflow list to process each workflow individually.
- GitHub File Retrieval: For each workflow, fetch the corresponding JSON file from the GitHub repository.
- Workflow Detail Query: Obtain detailed information of the current workflow.
- Difference Determination: Compare local workflow content with the GitHub backup file to classify status as “identical,” “different,” or “new.”
- GitHub Synchronization Operations: Perform corresponding actions based on status:
- Skip if “identical”;
- Update existing file if “different”;
- Create a new file if “new.”
- Loop Processing: After backing up one workflow, continue to the next.
Involved Systems or Services
- n8n: Automation workflow platform providing workflow data APIs.
- GitHub: Backup repository storing workflow JSON configuration files.
- HTTP Request Node: Used to access the local n8n service API.
- Scheduled Cron Trigger: Enables automated scheduled backups.
- Function Node: Used for data format transformation and difference evaluation.
- Merge, Switch, Batch Processing Nodes: Facilitate flow merging, branching, and batch processing.
Target Users and Value
- Designed for developers and operations engineers using the n8n automation platform.
- Suitable for teams requiring standardized management and backup of multiple automated workflows.
- Helps reduce risks caused by workflow loss or version conflicts, improving operational security and efficiency.
- Facilitates team code auditing and historical change tracking.