# Automated workflow backups to GitHub with Slack: n8n workflow

> Started by an event in a connected app, and works across GitHub and Slack. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

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

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

# Automated workflow backups to GitHub with Slack

Started by an event in a connected app, and works across GitHub and Slack. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-workflow-backups-to-github-with-slack)

**22 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 12 Service 9

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

- 1 **Click me to trigger** Manual trigger *Starts it*
- 2 **Define Local Variables** Set *Logic*
- 3 **n8n** N8n *Service*
- 4 **Get all workflows on GitHub** Github *Service*
- 5 **Find new workflows** Merge *Logic*
- 6 **Find updated workflows** Merge *Logic*
- 7 **Get content for each workflow** Github *Service*
- 8 **Wait until branch created1** Merge *Logic*
- 9 **Wait for finished** Merge *Logic*
- 10 **Wait until branch created** Merge *Logic*
- 11 **Base64decode workflow content** Set *Logic*
- 12 **Filter empty data** Filter *Logic*
- 13 **If there are any changes in workflows** If *Logic*
- 14 **Filter empty data1** Filter *Logic*
- 15 **Create new commit to add new workflow** Github *Service*
- 16 **Get latest commit SHA on main via GitHub API** Http Request *Service*
- 17 **No Operation, do nothing** No Op *Logic*
- 18 **Create new commit to update changed workflow** Github *Service*
- 19 **Wait for GitHub create/edit file finished** Merge *Logic*
- 20 **Create new branch via GitHub API** Http Request *Service*
- 21 **Create new PR via GitHub API** Http Request *Service*
- 22 **Slack** Slack *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 22, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** GitHub, Slack
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own GitHub and Slack accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

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?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

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 22 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-workflow-backups-to-github-with-slack)
- **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.

## Connects to

Each opens the other workflows that use it.

[GitHub](https://millionrounds.com/workflows?service=GitHub#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Automated Customer Onboarding Sequence with HubSpot** 22 steps · Email, HubSpot](https://millionrounds.com/workflow/automated-customer-onboarding-sequence-with-hubspot)
- [**Gate Telegram bot access with Stripe and Slack** 22 steps · Slack, Telegram](https://millionrounds.com/workflow/gate-telegram-bot-access-with-stripe-and-slack)
- [**Monitor empty successful workflows with Data Tables and Slack** 22 steps · Slack, n8n data table](https://millionrounds.com/workflow/monitor-empty-successful-workflows-with-data-tables-and-slac)
- [**Monitor workflow heartbeats with Google Sheets and Slack** 22 steps · Google Sheets, Slack](https://millionrounds.com/workflow/monitor-workflow-heartbeats-with-google-sheets-and-slack)
- [**Predict transformer overload risk and send alerts** 22 steps · Email, Google Sheets](https://millionrounds.com/workflow/predict-transformer-overload-risk-and-send-alerts)
- [**Sync Google Calendar events to Google Sheets with Slack** 22 steps · Gmail, Google Calendar](https://millionrounds.com/workflow/sync-google-calendar-events-to-google-sheets-with-slack)
