Backup your workflows to GitHub -- in (subfolders)
Ready for 3.0What this workflow does
This workflow has 21 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects GitHub.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- n8n: uses n8n
- Merge: merges the data from its input branches
- tag? (Switch): routes items into 2 branches
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- isDiffOrNew (Code): runs custom JavaScript code
- / (Edit Fields (Set)): sets 1 field: tags[0].name
- Globals (Edit Fields (Set)): sets 3 fields: repo.owner, repo.name, repo.path
- Execute Workflow (Execute Sub-workflow): calls another n8n workflow
- Check Status (Switch): routes items into 3 branches
- Get file data (GitHub): get (file)
…plus 5 more steps. See the full node list below.
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 (14)
- Manual Trigger
n8n-nodes-base.manualTrigger - n8n
n8n-nodes-base.n8n - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - No Operation, do nothing
n8n-nodes-base.noOp - GitHub
n8n-nodes-base.github - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Execute Sub-workflow
n8n-nodes-base.executeWorkflow
From the author
Based on Jonathan & Solomon work. > The only addition I've made is a Set node. This node organizes workflows into subfolders within the GitHub repository based on their respective tags. How it works This workflow will backup your workflows to GitHub. It…