⚙️ Automated workflow backup to GitHub on schedule

628 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

Easily ensure your n8n workflows are never lost! This template automates the process of backing up all your n8n workflows to a GitHub repository every 6 hours. Set it up once and enjoy worry-free workflow versioning and disaster recovery! 🔄✨

📝 What This Workflow Does

⚡️ Why Use This Template?

📦 How the Template Works: Step-by-step Overview

  1. Scheduled Trigger: Fires every 6 hours to launch the backup sequence.
  2. Get All Workflows: Uses the HTTP Request node to fetch all n8n workflows from your instance as JSON data.
  3. Move Binary Data: Converts the JSON into a binary format, ready for GitHub storage.
  4. Edit/Create Backup File: Attempts to edit (update) an existing backup file in your GitHub repo. If the file does not exist, the workflow will create a new one.
  5. Conditional Logic: Checks after each run whether the backup file exists and ensures previous versions can be recovered or merged as needed.
  6. Repeat: The process auto-loops every 6 hours—no further intervention required!

🔧 How To Set Up On Your Server

  1. Import the template into your n8n instance.
  2. Configure your GitHub credentials in the workflow nodes.
  3. Update the GitHub repository details (owner, repository, and filePath) to use your own repo and desired file path.
  4. Set your n8n API key and update the API endpoint URL to match your deployment.
  5. Save and activate the workflow—now your backups are on autopilot!

👨‍💻 Example Use Cases

🌟 Pro Tips

Protect your n8n workflows with automated, reliable, and versioned GitHub backups—set it and forget it! 🚦🔒

🔗 Nodes Used

GitHub, HTTP Request, Convert to/from binary data, Schedule Trigger

📥 Import

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

📖 Importing guide · 🔑 Credential setup