Automate n8n Workflow Backup and Version Control with GitHub

Github
Complex Trigger

This n8n workflow automates the crucial process of backing up all active n8n workflows to a designated GitHub repository. Designed for scheduled execution, it first queries the n8n instance's API to retrieve a list of all current workflows and their JSON definitions. For each workflow, it then checks if a corresponding JSON file already exists in the configured GitHub repository. If the file is new, the workflow creates it in GitHub. If the file already exists, it performs a content comparison between the current n8n workflow definition and the version stored in GitHub. Should any changes be detected, the workflow updates the file in the GitHub repository, ensuring that the backup is always up-to-date. This mechanism provides robust version control, a comprehensive historical record of all workflow changes, and a reliable disaster recovery solution for your n8n automations, leveraging GitHub's capabilities.

17
Nodes
8
Services
3
Categories
Complex
Type

Get This Workflow

Free n8n workflow template ready to import

Share on social

File Details

Filename
0628_Code_Schedule_Export_Scheduled.json
Category
Code
Updated
09/04/2025

Services & Integrations

Github
Set
N8n
Split In Batches
If
Code
Schedule Trigger
Sticky Note

Interactive Workflow Diagram

Official n8n visualization • Click and drag to explore

Loading workflow visualization...

Official n8n visualization

How to Use This Workflow

1

Download the Workflow

Click the "Download Workflow" button above to get the JSON file.

2

Import to n8n

In your n8n instance, go to Workflows → Import and select the JSON file.

3

Configure Credentials

Set up your Github and other service credentials in n8n.

4

Activate & Test

Activate the workflow and test it to ensure everything works correctly.

Tags

#code
#github
#set
#n8n
#complex
#code
#development
#workflow-automation

Related Workflows

Manually Trigger Subworkflow for Scheduled GitHub Code Creation

Manual Trigger26 nodes

Code Github Create Scheduled Workflow

Code23 nodes

Code Github Create Scheduled Workflow

Code25 nodes

Code Github Create Scheduled Workflow

Code24 nodes

Need a Custom Solution?

Get a custom n8n workflow built specifically for your business needs.

⚙️ Custom Development🤖 AI Consulting🚀 Implementation

Ready to transform your business?