Templates / Git backup of workflows and credentials

Git backup of workflows and credentials

Needs changes

by Allan Daemon · 16,208 views · created 2021-04-22 · DevOps

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Cron. 1 breaking item(s) found. Static check, last run 2026-10-19.

What 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).

  1. Export Workflows (Execute Command): runs a shell command on the n8n host
  2. Export Credentials (Execute Command): runs a shell command on the n8n host
  3. git add (Execute Command): runs a shell command on the n8n host
  4. git commit (Execute Command): runs a shell command on the n8n host
  5. 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.0Replace with
Cron
Cron
Schedule Trigger

Nodes used (3)

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…

Excerpt from Allan Daemon's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.