# Automated n8n workflow backup with Git: n8n workflow template

> Started by a clock. It calls services over plain HTTP rather than through connectors. 18 steps, 3 branches, 2 loops or waits: a working afternoon to...

Source: https://millionrounds.com/workflow/automated-n8n-workflow-backup-with-git (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Setup and learning](https://millionrounds.com/workflows?category=Setup+and+learning#library)

# Automated n8n workflow backup with Git

Started by a clock. It calls services over plain HTTP rather than through connectors. 18 steps, 3 branches, 2 loops or waits: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-n8n-workflow-backup-with-git)

**18 steps** Medium: a working afternoon

**3** Branches: places the flow splits

**2** Loops or waits

**0** Services by connector: it calls them over plain HTTP

## The flow

Starts it 2 Logic 6 Service 10

The steps in the order they run, from what starts it.

- 1 **Daily Backup Trigger** Schedule trigger *Starts it*
- 2 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 3 **Extract MySuperAuth Token** Execute Command *Service*
- 4 **Configure Git Repository** Set *Logic*
- 5 **Check Local Repository** Execute Command *Service*
- 6 **Check Repository Existence** If *Logic*
- 7 **Fetch All Workflows** N8n *Service*
- 8 **Clone Git Repository** Execute Command *Service*
- 9 **Process Workflows** Split In Batches *Logic*
- 10 **Want to Export Credentials?** If *Logic*
- 11 **Export Current Workflow** Execute Command *Service*
- 12 **Export Credentials** Execute Command *Service*
- 13 **Wait For All Exports** Wait *Logic*
- 14 **Rename Workflow Files** Execute Command *Service*
- 15 **Stage Changes** Execute Command *Service*
- 16 **Any Change in the Workflows** If *Logic*
- 17 **Commit Changes** Execute Command *Service*
- 18 **Push to Remote Repository** Execute Command *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 18, with 3 branches, 2 loops or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Nothing by connector; it calls services over plain HTTP
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 18 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-n8n-workflow-backup-with-git)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Workflows like it

Also setup and learning, with the same services where possible, closest in size first.

- [**Expose CRM read/write tools to Claude and ChatGPT with Gmail** 18 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/expose-crm-read-write-tools-to-claude-and-chatgpt-with-gmail)
- [**Expose file, form, & hook operations to AI agents - KoBoToolbox** 18 steps](https://millionrounds.com/workflow/expose-file-form-and-hook-operations-to-ai-agents-kobotoolbo)
- [**Google Drive tool MCP server all 17 operations** 18 steps](https://millionrounds.com/workflow/google-drive-tool-mcp-server-all-17-operations)
- [**HighLevel tool MCP server all 17 operations with GoHighLevel** 18 steps · GoHighLevel](https://millionrounds.com/workflow/highlevel-tool-mcp-server-all-17-operations-with-gohighlevel)
- [**Nextcloud tool MCP server all 17 operations** 18 steps](https://millionrounds.com/workflow/nextcloud-tool-mcp-server-all-17-operations)
- [**AI-powered GoHighLevel CRM assistant with OpenAI** 18 steps · calls a model · GoHighLevel](https://millionrounds.com/workflow/ai-powered-gohighlevel-crm-assistant-with-openai)
