Back up workflows daily to GitHub with incremental updates
Ready for 3.0What this workflow does
This workflow has 14 nodes and runs on a schedule (every day at 23:00). Along the way it connects GitHub. It also calls api.github.com over HTTP.
How it runs
Trigger: On a schedule (every day at 23:00).
- Get many workflows (n8n): uses n8n
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Get a file (GitHub): get (file)
- If: checks a condition and branches into true / false
- Get Last Update Date (HTTP Request): calls api.github.com
- Get a workflow (n8n): get
- filter_date (If): checks a condition and branches into true / false
- Create a file (GitHub): work with file
- Download workflow (n8n): get
- Wait: waits 10 seconds
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: api.github.com
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 (7)
- n8n
n8n-nodes-base.n8n - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - GitHub
n8n-nodes-base.github - If
n8n-nodes-base.if - Wait
n8n-nodes-base.wait - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow runs nightly to back up all workflows from your n8n instance to a GitHub repository, creating a new JSON file for new workflows and only updating existing files when the workflow has changed to avoid unnecessary commits. How it…