Git backup of workflows and credentials — n8n Workflow
Overview
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 repository in some remote place to host your project, like Github, Gitlab, or your favorite private repo.
Clone the repository in the server in a place that the n8n has access. In the example, it's the ., and the repository name is repo.
Nodes used
Workflow Preview
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 7 nodes, connecting cron, executecommand, manualtrigger.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (7)
On clicking 'execute'
manualTrigger
git push
executeCommand
Cron
cron
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows → New → Import from file.
- 3Select the downloaded
git-backup-of-workflows-and-credentialsfile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n → Import from JSON:
Integrations
Created by
Allan Daemon
@allandaemon
Tags
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free →