# Back up GitHub repositories with Amazon S3: n8n workflow

> Started by a clock, and works across Email and S3. 15 steps, 1 branch, 1 loop or waits: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/back-up-github-repositories-with-amazon-s3 (Millionrounds; every figure on the page links to its filing or article)

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

# Back up GitHub repositories with Amazon S3

Started by a clock, and works across Email and S3. 15 steps, 1 branch, 1 loop or waits: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fback-up-github-repositories-with-amazon-s3)

**15 steps** Medium: a working afternoon

**1** Branch: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 7 Service 7

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

- 1 **When Nightly at 2 AM** Schedule trigger *Starts it*
- 2 **Set Backup Parameters** Set *Logic*
- 3 **Validate Backup Settings** Code *Logic*
- 4 **Fetch GitHub Account Info** Http Request *Service*
- 5 **List GitHub Repos** Http Request *Service*
- 6 **Process Each Repository** Split In Batches *Logic*
- 7 **List S3 Backups** Aws S3 *Service*
- 8 **Download Repo Archive** Http Request *Service*
- 9 **Filter Expired Backups** Code *Logic*
- 10 **Upload Archive to S3** Aws S3 *Service*
- 11 **Log Repository Backup Status** Code *Logic*
- 12 **Check Expired Backups** If *Logic*
- 13 **Delete Expired Backup** Aws S3 *Service*
- 14 **Generate Backup Report** Code *Logic*
- 15 **Send Backup Report Email** Email Send *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 15, with 1 branch, 1 loop or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Email, S3
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Email and S3 accounts. 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. 15 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 15 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%2Fback-up-github-repositories-with-amazon-s3)
- **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.

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

## Workflows like it

Also research and reporting, with the same services where possible, closest in size first.

- [**Prioritize and report Wazuh vulnerabilities with EPSS** 15 steps · Email, n8n data table](https://millionrounds.com/workflow/prioritize-and-report-wazuh-vulnerabilities-with-epss)
- [**Automate Singapore COE price analysis & purchase timing** 15 steps · calls a model · Email, Google Sheets](https://millionrounds.com/workflow/automate-singapore-coe-price-analysis-and-purchase-timing)
- [**Automated Google Drive to FTP transfer with JSON** 14 steps · Email, FTP](https://millionrounds.com/workflow/automated-google-drive-to-ftp-transfer-with-json)
- [**Email reports on expiring Microsoft Entra ID app secrets** 16 steps · Email](https://millionrounds.com/workflow/email-reports-on-expiring-microsoft-entra-id-app-secrets)
- [**Report spam and phishing URLs from IMAP mailboxes to Spamhaus** 14 steps · Email](https://millionrounds.com/workflow/report-spam-and-phishing-urls-from-imap-mailboxes-to-spamhau)
- [**Trigger advanced Google Analytics reports** 14 steps · Email, NocoDB](https://millionrounds.com/workflow/fluxo-disparo-de-relatorios-do-google-analytics-avancado)
