Automated N8N Workflow Backups to GitLab Organized by User
detail.loadingPreview
Seamlessly automate the backup of your n8n workflows to GitLab, with each workflow neatly organized by its creator. This solution ensures your valuable automation logic is securely stored and easily accessible for disaster recovery or auditing purposes.
About This Workflow
This n8n workflow provides a robust solution for automating the backup of your n8n workflows to a GitLab repository. It intelligently fetches all active workflows, processes them individually, and organizes them into a structured directory within GitLab, segregated by the workflow creator's username. The backup process can be triggered manually or scheduled weekly, ensuring your automation logic is consistently preserved. Each workflow is saved as a JSON file with a clean, URL-friendly filename, within a year and month-based directory structure. The workflow also includes error handling and logging to notify you of any issues during the backup process, making it an essential tool for maintaining the integrity and availability of your n8n automation infrastructure.
Key Features
- Automated Workflow Fetching: Retrieves all active n8n workflows directly from your n8n instance.
- Organized GitLab Storage: Stores backups in GitLab, categorized by workflow creator's username for easy management.
- Flexible Scheduling: Supports both manual triggers and weekly scheduled backups.
- Intelligent File Naming: Creates clean, standardized JSON filenames for each workflow.
- Error Logging and Reporting: Notifies you of backup failures with detailed error messages.
How To Use
- Configure n8n Credentials: Set up your n8n API credentials in the 'Fetch N8N Workflows' node. Ensure the 'n8nApi' credential is properly configured.
- Configure GitLab Credentials: Set up your GitLab API credentials in the 'Update Backup Summary' node. Ensure the 'gitlabApi' credential is properly configured with the correct project details (owner, repository, branch).
- Set Backup Schedule (Optional): Modify the 'Scheduled Weekly Backup' node if you wish to change the backup frequency or time. By default, it's set to run weekly on Friday at 6 PM.
- Define Creator Mapping: In the 'Format Workflow for GitLab' node, review and adjust the
creatorNamelogic to accurately map your n8n workflow names to specific usernames for organization in GitLab. - Customize GitLab Path: The
filePathin the 'Format Workflow for GitLab' node determines the directory structure within your GitLab repository. Adjust it as needed for your preferred organization. - Test the Workflow: Manually trigger the workflow using the 'Manual Backup Trigger' node to verify that workflows are being fetched, formatted, and successfully uploaded to GitLab.
- Monitor Execution: Observe the execution logs for any errors or warnings. The workflow includes an 'if' node to check for common request errors and a 'Send email' node (configure this node separately with your email settings) to receive notifications.
Apps Used
Workflow JSON
{
"id": "dda51f12-ef80-40df-bf38-8c84615d6aca",
"name": "Automated N8N Workflow Backups to GitLab Organized by User",
"nodes": 17,
"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: dda51f12-ef80...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
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.