Use this robust n8n workflow to automatically backup and version control all your active n8n workflows to a GitHub repository, ensuring data safety and easy rollback.
Download this n8n workflow template and start using it instantly.
Maintaining reliable backups of your automation logic is paramount. This professional n8n workflow solves the problem of manual backups by providing a complete, scheduled automation using a powerful n8n trigger. Every 24 hours, the n8n node sequence checks your entire n8n instance. It intelligently compares the current configuration of each n8n workflow against its last committed version in GitHub. Using custom comparison logic, it only commits changes if the workflow structure is truly 'different' or if it is a 'new' n8n template being backed up for the first time. This ensures efficient use of your GitHub repository and provides a complete audit trail for all changes made to your crucial n8n workflow configurations.
This automation begins with a scheduled n8n trigger, initiating the daily backup process.
repoowner: Your GitHub username or organization name.reponame: The name of the repository where backups will be stored (e.g., n8n-workflows).sub_path: The directory path within the repository (e.g., folder). Schedule Trigger: This is the primary n8n trigger, configured to run the backup process on a recurring schedule (defaulting to daily).
Get Workflows (n8n node): Retrieves a list of all active n8n templates (workflows) on the current n8n instance. This is essential for knowing what needs to be backed up.
Filter: Filters the list to only include n8n workflow items where the updatedAt timestamp is within the last 24 hours, optimizing processing for large instances.
Loop Over Items (Split In Batches): Allows the workflow to process each n8n workflow item sequentially, enabling individual GitHub operations.
Get a file (GitHub node): Attempts to fetch the existing backup file from GitHub, using the workflow name to form the file path. Crucially configured to 'continueRegularOutput' on errors (like 404 Not Found).
isDiffOrNew (Code node): A custom n8n node script that determines the sync status ('same', 'different', or 'new'). It decodes Base64 content from GitHub and compares the workflow JSON structures, ensuring reliable comparison by sorting object keys before stringifying.
Switch: Routes the flow based on the status set by the isDiffOrNew node.
Edit existing file (GitHub node): Executes when a change is detected. Commits the updated n8n workflow JSON, including the commit message identifying the change type (different).
Create new file (GitHub node): Executes when a new n8n workflow is detected. Creates the initial backup file.
Completed Notification (Slack node): (Disabled by default) Sends a summary notification after the entire execution, detailing how many n8n templates were processed.
Secure your critical automations with this daily n8n workflow backup. Automatically sync active n8n templates to GitLab, using an n8n node for internal API access, complete with failure Slack alerts.

Automate WhatsApp group intelligence gathering using this n8n workflow. Transcribe voice messages, store data in Google Sheets, and get daily GPT-4 powered summaries.

Use this powerful n8n workflow to schedule daily web scraping with Firecrawl's AI extraction, guaranteeing structured data delivery via Telegram. Ideal for market monitoring.

Use this powerful n8n workflow to automatically summarize daily meetings from Google Calendar using the Gemini AI agent and post the results directly to Slack. Integrate this n8n template for improved productivity.

Build a sophisticated AI Data Analytics Department using this n8n workflow. The CDO Agent delegates tasks to specialized agents (Data Science, BI, ML) powered by OpenAI O3 and GPT-4.1-mini for high efficiency.

Use this powerful n8n workflow to automatically process uploaded medical faxes or complex PDFs. Leverage Google Gemini 2.0 for data extraction, structure the output using the LLM Chain n8n node, and store the final results in Google Sheets.


Analyst-Developer







































