Automation library · Data collection

Back up and restore n8n workflows with GitHub

Started by a clock, and works across GitHub. 27 steps, 4 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large

27 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
2Loops or waits
1Service it connects to

The flow

Starts it 2Logic 12Service 13

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

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2When clicking ‘Execute workflow’Manual triggerStarts it
  3. 3Set Github DataSetLogic
  4. 4Set Github Data1SetLogic
  5. 5Get Download Url for Index FileGithubService
  6. 6List Workflow FilesGithubService
  7. 7Get Index File ContentHttp RequestService
  8. 8Index File Not FoundIfLogic
  9. 9Loop Over ItemsSplit In BatchesLogic
  10. 10Workflows Folder Not FoundIfLogic
  11. 11Get All WorkflowsN8nService
  12. 12Create Index FileGithubService
  13. 13Get File ContentHttp RequestService
  14. 14C,E,D CheckerCodeLogic
  15. 15WaitWaitLogic
  16. 16Create WorkflowN8nService
  17. 17SwitchSwitchLogic
  18. 18Create New FilesGithubService
  19. 19Get Download Url for Github FileGithubService
  20. 20Merge Github & n8n FileMergeLogic
  21. 21Delete FilesGithubService
  22. 22Update Index FileGithubService
  23. 23Get Github File ContentHttp RequestService
  24. 24File Edit CheckerCodeLogic
  25. 25Parse Github File ContentCodeLogic
  26. 26If File EditedIfLogic
  27. 27Edit FilesGithubService

How it's built

Starts on
A clock
Steps
27, with 4 branches, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
GitHub
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own GitHub 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?

Take your time. At 27 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 27 steps before you point it at anything that matters.