A comprehensive n8n workflow that provides complete bidirectional sync between your n8n instance and GitHub - automatically backs up all your workflows with intelligent change detection AND restores them when needed.
This workflow combines two powerful features in one:
index.json from your GitHub repository.
index.json with latest mappings.[Workflow Name] (Action) YYYY-MM-DDworkflows/ folder in your GitHub repository.
GitHub OAuth2 Credentials:
https://your-n8n.com/rest/oauth2-credential/callback).GitHub Repository:
n8n API Credentials:
Import the Workflow:
Create GitHub Repository:
n8n-workflows-manager).Set Up GitHub OAuth2:
Set Up n8n API Credentials:
https://your-n8n.com).Configure Repository Details:
repo_owner: Replace "your-github-username" with your GitHub username.repo_name: Replace "your-github-repository-name" with your repository name.Connect Credentials to Nodes:
Test Backup:
index.json and workflows/ folder with your workflows.Activate for Auto Backup:
Test Restore (only after you have backups in GitHub):
When to Use Restore:
index.json tracks all workflows; workflows/ folder contains individual workflow files.triggerAtHour (default: 19 = 7 PM UTC)filePath in GitHub nodes to change storage locationAuthor: Muhammad Anas Farooq