Backup your credentials to GitHub
Ready for 3.0What this workflow does
This workflow has 20 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).
- Execute Command: runs a shell command on the n8n host
- Globals (Edit Fields (Set)): sets 3 fields: repo.owner, repo.name, repo.path
- Merge: merges the data from its input branches
- JSON formatting (Code): runs custom JavaScript code
- isDiffOrNew (Code): runs custom JavaScript code
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Check Status (Switch): routes items into 3 branches
- Execute Workflow (Execute Sub-workflow): calls another n8n workflow
- Return (Edit Fields (Set)): sets 1 field: Done
- Edit existing file (GitHub): edit (file)
…plus 4 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 - 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 Command
n8n-nodes-base.executeCommand - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger
From the author
Based on Jonathan's work. Check out his templates. This workflow will backup your credentials to GitHub. It uses a CLI command to export all credentials. It then loops over the data, checks in GitHub to see if a file exists that uses the credential's ID. Once…