Back up your n8n workflows to Github
Ready for 3.0What this workflow does
This workflow has 23 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects GitHub and Slack.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Starting Message (Slack): uses Slack
- Config (Edit Fields (Set)): sets 3 fields: repo_owner, repo_name, repo_path
- n8n: uses n8n
- Get file data (GitHub): get (file)
- Merge: merges the data from its input branches
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- If: checks a condition and branches into true / false
- isDiffOrNew (Code): runs custom JavaScript code
- Completed Notification (Slack): uses Slack
- Execute Workflow (Execute Sub-workflow): calls another n8n workflow
…plus 7 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 - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - 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 - Slack
n8n-nodes-base.slack - Execute Sub-workflow
n8n-nodes-base.executeWorkflow
From the author
This workflow will backup your workflows to Github. It uses the public api to export all of the workflow data using the n8n node. It then loops over the data checks in Github to see if a file exists that uses the workflow name. Once checked it will then…