โจ๐Automated workflow backups to Google Drive
โจ๐ Automated Workflow Backups to Google Drive This workflow automates the process of backing up your n8n workflows to Google Drive daily. It creates timestamped folders, saves workflows as JSON files, and manages old...
Template notes
โจ๐ Automated Workflow Backups to Google Drive
This workflow automates the process of backing up your n8n workflows to Google Drive daily. It creates timestamped folders, saves workflows as JSON files, and manages old backups by retaining only the most recent seven days of data. Notifications are sent via Telegram to keep you informed of the backup status.
How It Works
Backup Creation Process ๐๏ธ - Triggering Backups: The workflow starts with either a manual trigger or a scheduled trigger that runs daily. - Folder Creation: Creates a new folder in Google Drive with a timestamped name (e.g., n8n-Workflow-Backups-YYYY-MM-DD). - Workflow Retrieval: Fetches all workflows from your n8n instance. - File Conversion: Converts each workflow into a JSON file for storage. - File Upload: Saves the JSON files into the newly created Google Drive folder.
Backup Management ๐ - Folder Search: Searches for existing backup folders in Google Drive with names matching n8n-Workflow-Backups. - Retention Policy: Identifies folders older than seven days using a custom JavaScript function and deletes them permanently to free up space.
Notifications ๐ฒ - Telegram Alerts: Sends a message via Telegram once the backup process is complete, including the folder name and a link to access it in Google Drive.
Setup Steps
API Configuration ๐ 1. Google Drive Integration: - Set up Google Drive OAuth2 credentials in n8n. - Specify the root folder or desired location for backups. 2. n8n API Access: - Configure n8n API credentials to allow fetching workflows. 3. Telegram Notifications: - Add your Telegram bot credentials and chat ID for notification delivery.