Git backup of workflows and credentials
Needs changesWhat this workflow does
This workflow has 7 nodes and runs on a schedule (legacy Cron node) (plus 1 other trigger). It uses only n8n's built-in nodes.
How it runs
Trigger: On a schedule (legacy Cron node) (plus 1 other trigger).
- Export Workflows (Execute Command): runs a shell command on the n8n host
- Export Credentials (Execute Command): runs a shell command on the n8n host
- git add (Execute Command): runs a shell command on the n8n host
- git commit (Execute Command): runs a shell command on the n8n host
- git push (Execute Command): runs a shell command on the n8n host
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Cron: replace with Schedule Trigger.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Cron Cron | Schedule Trigger |
Nodes used (3)
- Manual Trigger
n8n-nodes-base.manualTrigger - Execute Command
n8n-nodes-base.executeCommand - Cron
n8n-nodes-base.cron
From the author
This creates a git backup of the workflows and credentials. It uses the n8n export command with git diff, so you can run as many times as you want, but only when there are changes they will create a commit. Setup You need some access to the server. Create a…