⚙️ Bidirectional GitHub workflow sync & version control for n8n workflows

1,811 views · ⚙️ DevOps & CI/CD

💡 Pro Tip — If you need GitHub data beyond what the REST API gives you, ScraperNode has a repository scraper that extracts metadata at scale without token rate limits.

View All Scrapers

Description

Who is this for? This template is ideal for n8n administrators, automation engineers, and DevOps teams who want to maintain bidirectional synchronization between their n8n workflows and GitHub repositories. It helps teams keep their workflow backups up-to-date and ensures consistency between their n8n instance and version control system.

What problem is this workflow solving? Managing workflow versions across n8n and GitHub can become complex when changes happen in both places. This workflow solves that by automatically synchronizing workflows bidirectionally, ensuring that the most recent version is always available in both systems without manual intervention or version conflicts.

What this workflow does:

Setup:

  1. Connect GitHub: Configure GitHub API credentials in the GitHub nodes. Note: Use a GitHub Personal Access Token (classic) with repo permissions to read and write workflow files.

  2. Connect n8n API: Provide your n8n API credentials in the n8n nodes. Check this doc

  3. Configure GitHub Details in the Set GitHub Details node:

    • github_account_name: Your GitHub username or organization
    • github_repo_name: The repository name where workflows should be stored
    • repo_workflows_path: The folder path in your repo (e.g., workflows or n8n-workflows)
  4. Adjust Schedule: Modify the Schedule Trigger if you want a different sync frequency (currently set to weekly on Mondays).

  5. Test the workflow: Run it manually first to ensure all connections and permissions are working correctly.

How to customize this workflow to your needs:

Key Features:

This automated synchronization workflow provides a robust backup and version control solution for n8n workflows, ensuring your automation assets are always safely stored and consistently available across environments.

🔗 Nodes Used

GitHub, n8n, Schedule Trigger, Filter, Convert to File, Extract from File

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup