Back up workflows to Google Drive daily with automatic cleanup
This workflow automatically creates daily backups of all n8n workflows and stores them in Google Drive, using the n8n API to export workflows and a scheduled retention policy to keep storage organized.
The automation runs in two stages: backup and cleanup.
Daily Backup Process
A Schedule Trigger runs at a defined time each day.
The workflow creates a folder in Google Drive using the current date.
It calls the n8n API to retrieve the list of all workflows.
Each workflow is processed individually and converted into a .json file.
The files are uploaded to the daily backup folder in Google Drive.
This ensures that every workflow is safely stored and versioned by date.
Automatic Cleanup
A second scheduled process maintains storage hygiene:
The workflow lists all backup folders in the Google Drive root directory.
It checks the folder creation date.
Any folder older than the defined retention period (default 15 days) is automatically deleted.
This prevents unnecessary storage usage while keeping recent backups easily accessible.
Key Features
Automated daily workflow backups
Uses n8n API to export workflows
Files stored in Google Drive
Automatic retention cleanup
Fully documented with sticky notes inside the workflow
Uses secure credentials (no hardcoded API keys)
Setup
Configuration takes only a few minutes:
Connect a Google Drive OAuth credential
Define the Google Drive root folder ID for backups
Configure n8n API credentials securely
Adjust:
Backup schedule
Retention period (default 15 days)
Once configured, the workflow will run automatically, creating daily backups and removing old ones without manual intervention.
Related Templates
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Add product ideas to Google Sheets via a Slack
Use Case This workflow is a slight variation of a workflow we're using at n8n. In most companies, employees have a lot o...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments