Automated n8n workflow backup to GitHub with deletion tracking
Ready for 3.0What this workflow does
This workflow has 27 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).
- Globals (Edit Fields (Set)): sets 2 fields: repo.owner, repo.name
- Switch: routes items into 2 branches
- Get many workflows (n8n): uses n8n
- Get file data (GitHub): get (file)
- Merge: merges the data from its input branches
- isDeleted (Code): runs custom JavaScript code
- Workflows (Aggregate): combines items into one
- n8n (Edit Fields (Set)): sets 3 fields: repo.owner, repo.name, origin
- If: checks a condition and branches into true / false
- isDiffOrNew (Code): runs custom JavaScript code
…plus 11 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 (15)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - 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 - Switch
n8n-nodes-base.switch - n8n
n8n-nodes-base.n8n - Aggregate
n8n-nodes-base.aggregate - Merge
n8n-nodes-base.merge
From the author
Remixed Backup your workflows to GitHub from Solomon's work. Check out his templates. How it works This workflow will backup your workflows to GitHub. It uses the n8n API node to export all workflows. It then loops over the data, checks in GitHub to see if a…