Automated n8n workflows backup on GitLab with username organization
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects GitLab.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Fetch N8N Workflows (n8n): uses n8n
- Prepare Backup Metadata (Edit Fields (Set)): sets 2 fields: backupDate, backupPath
- Process Each Workflow (Loop Over Items (Split in Batches)): loops over the items in batches
- Log Backup Results (Edit Fields (Set)): sets 2 fields: errorLog, successLog
- Format Workflow for GitLab (Edit Fields (Set)): sets 4 fields: workflowData, creatorName, fileName…
- Send Email: sends an email over SMTP
- Rate Limit Control (Wait): waits 2 seconds
- Create to GitLab Repository (GitLab): work with file
- Check Backup Status (If): checks a condition and branches into true / false
- Update Backup Summary (GitLab): edit (file)
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Manual Trigger
n8n-nodes-base.manualTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - n8n
n8n-nodes-base.n8n - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Wait
n8n-nodes-base.wait - If
n8n-nodes-base.if - GitLab
n8n-nodes-base.gitlab - Send Email
n8n-nodes-base.emailSend
From the author
Overview This solution ensures the secure backup and version control of your self-hosted n8n workflows by storing them in a GitLab repository. It compares current workflows with their GitLab counterparts, updates files when differences are detected, and…