n8n flows
Scenario Backups
Automated daily backup of every n8n workflow to Google Drive as JSON, retaining the newest 365 daily folders.
Backs up every n8n workflow to Google Drive as JSON files once a day, keeping the most recent 365 daily folders and deleting anything older.
At a glance
- Status: Active.
- Trigger: Schedule (daily) plus a manual trigger.
- Runs on: All workflows in the instance, once per day.
- Talks to: Google Drive (folder create, search, delete, file upload) and the n8n internal API (workflow export).
How it works
Get DateTimecaptures the timestamp.Search For Backup Folderlooks for today's dated folder;Found Folder?reuses it, orCreate Folder with DateTime Stampcreates a new one.Get Workflowsfetches all workflows.Loop Over Itemsconverts each workflow to a JSON file and saves it to today's Google Drive folder.- On completion, it lists all backup folders,
Find Folders to Deletesorts them descending and slices off everything beyond the newest 365, andDelete Foldersremoves them permanently.
Notes
- Backups land in the "n8n Backups" Google Drive folder.
- Retention is 365 days, despite a bundled sticky note that mentions 7 days.
- A Telegram-notification step referenced in the sticky note was removed.
Related
- Error Handler: the shared error workflow that captures failures.
- Map Workflows ↔ Supabase Tables: another instance-wide introspection utility.
- Get Total Execution Usage: instance-wide execution reporting.
- See also Data flows.