Automated n8n Workflow Backups to GitHub
detail.loadingPreview
Securely back up your n8n workflows to a GitHub repository. This automated solution ensures your automation configurations are safely stored and version-controlled, providing peace of mind and easy recovery.
About This Workflow
This n8n workflow automates the process of backing up your n8n workflows to a GitHub repository. Triggered daily, it fetches all active workflows from your n8n instance, retrieves their detailed data, and then pushes each workflow's JSON configuration as a new file to a designated GitHub repository. The workflow also handles existing files by updating them if changes are detected, ensuring your backup always reflects the latest state of your n8n setup. This provides a robust, version-controlled backup strategy, essential for maintaining the integrity and availability of your automation processes.
Key Features
- Scheduled Backups: Automatically backs up workflows daily at 23:59.
- Version Control: Leverages GitHub for robust version control of workflow configurations.
- Dynamic File Naming: Saves each workflow as a
.jsonfile named after its workflow ID. - Update Existing Files: Automatically updates existing workflow files in the repository if changes are detected.
- Secure Credentials: Utilizes n8n's credential management for secure API access.
How To Use
- Set up Cron Trigger: Configure the 'Daily at 23:59' node with your desired backup schedule.
- Connect to n8n API: Use the 'Get workflows' and 'Get workflow data' HTTP Request nodes, ensuring your n8n instance credentials are correctly set up.
- Transform Workflow Data: Utilize the 'transform' function node to prepare the workflow list for further processing.
- Fetch Raw Workflow Content: The 'Download Raw Content' node retrieves the actual JSON content of each workflow.
- Merge Data: Use the 'Merge' and 'Merge1' nodes to combine and prepare the workflow data for storage.
- Connect to GitHub: Configure the 'Create file' and 'GitHub Edit' nodes with your GitHub repository details, owner username, and a valid GitHub Personal Access Token for authentication.
Apps Used
Workflow JSON
{
"id": "6edf012d-cb04-4d89-8da5-47a1870ca820",
"name": "Automated n8n Workflow Backups to GitHub",
"nodes": 19,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 6edf012d-cb04...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.