workflows.fit
Back to n8n workflows
n8n templateFreeBy Akash Kankariya

Automated workflow backup to GitHub on schedule

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 a...

DevelopmentCore NodesSticky NoteMove Binary DataSchedule TriggerGithub
Loading interactive preview...

Template notes

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

- Schedules backups: Triggers the workflow automatically every 6 hours—no manual steps needed. ⏰ - Exports all current workflows: Collects a JSON snapshot of every workflow in your n8n instance. 📦 - Pushes backups to GitHub: Commits each backup file to your specified GitHub repository with a time-stamped commit message for easy tracking. 🗂️🚀 - Smart file handling: Checks if a backup file already exists and creates or updates as needed, keeping your repository clean and organized. 🤖

⚡️ Why Use This Template?

- Automate your workflow backups – never miss a backup again! - Seamless integration with GitHub for team collaboration, change management, and rollback. - Simple, reliable, and fully customizable to match your backup intervals and repository setup. - Peace of mind that your critical automation assets are always protected.

📦 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