Automation library · Documents and files

Automated workflow backup to Google Drive with Google Sheets

Started by a clock, and works across Google Drive and Google Sheets. 28 steps, 3 loops or waits: large, and worth reading before you trust it with anything live.

Large

28 stepsLarge: read it before trusting it with anything live
0Branches: places the flow splits
3Loops or waits
2Services it connects to

The flow

Starts it 1Logic 12Service 15

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

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2CONFIG - Set your variables hereSetLogic
  3. 3Read InventoryGoogle SheetsService
  4. 4Create new backup folderGoogle DriveService
  5. 5Get all n8n workflowsN8nService
  6. 6Loop over each workflowSplit In BatchesLogic
  7. 7Calculate Changes (Sheets)CodeLogic
  8. 8After all uploads completeSetLogic
  9. 9Format workflow for exportCodeLogic
  10. 10Split ChangesCodeLogic
  11. 11Clear InventoryGoogle SheetsService
  12. 12List all uploaded filesGoogle DriveService
  13. 13Upload workflow to Google DriveGoogle DriveService
  14. 14Append LogGoogle SheetsService
  15. 15Split InventoryCodeLogic
  16. 16Loop over files to downloadSplit In BatchesLogic
  17. 17Update InventoryGoogle SheetsService
  18. 18Merge binary filesCodeLogic
  19. 19Download file as binaryGoogle DriveService
  20. 20Compress to ZIPCompressionService
  21. 21Upload ZIP to parent folderGoogle DriveService
  22. 22Delete temporary folderGoogle DriveService
  23. 23Start cleanup (run once)SetLogic
  24. 24List ZIP backups from Google DriveGoogle DriveService
  25. 25Sort and isolate old ZIP backupsCodeLogic
  26. 26Loop over ZIP backups to deleteSplit In BatchesLogic
  27. 27Delete a fileGoogle DriveService
  28. 28Delete old ZIP backupGoogle DriveService

How it's built

Starts on
A clock
Steps
28, 3 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Google Sheets
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Google Drive and Google Sheets 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?

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