✨😃 Automated Workflow Backups to Google Drive

This workflow implements automated backups for all workflows, ensuring data security. It can be triggered either on a daily schedule or manually. The backup files are named with timestamps and stored in JSON format for easy management. The most recent 7 days of backups are retained, and expired files are automatically deleted to effectively save storage space. Additionally, users are notified in real-time via Telegram about the status of the backup completion, enhancing operational transparency. This is suitable for teams and individuals with high data security needs and those looking to simplify the backup process.

Workflow Diagram
✨😃 Automated Workflow Backups to Google Drive Workflow diagram

Workflow Name

✨😃 Automated Workflow Backups to Google Drive

Key Features and Highlights

  • Automatically backs up all n8n workflows daily to ensure data security.
  • Stores backups in timestamped folders for easy version control and retrieval.
  • Converts each workflow into a standardized JSON file format.
  • Retains backups for the most recent 7 days and automatically deletes expired backups to efficiently manage storage space.
  • Sends real-time backup completion notifications via Telegram, enhancing operational transparency and responsiveness.
  • Supports both manual and scheduled triggers for flexible and convenient execution.

Core Problems Addressed

  • Prevents loss of workflows due to accidental operations or system failures.
  • Reduces the complexity and risk of omissions associated with manual backups.
  • Automates backup version management to avoid uncontrolled storage growth.
  • Provides real-time status updates to ensure smooth completion of backup processes.

Use Cases

  • Automation teams and individuals requiring regular backups of n8n workflows.
  • Enterprise environments with high demands for workflow data security.
  • Automated operations scenarios aiming to simplify backup procedures and enable backup status notifications.
  • Workflow management requiring historical version control for rollback or auditing purposes.

Main Workflow Steps

  1. Trigger Workflow: Supports daily scheduled triggers or manual execution.
  2. Obtain Current Date and Time: Generates a timestamp for naming backup folders.
  3. Create Backup Folder on Google Drive: Named in the format n8n-Workflow-Backups-YYYY-MM-DD.
  4. Retrieve All Workflow Data from n8n, limited to a maximum of 200 workflows.
  5. Convert Each Workflow into a JSON File.
  6. Upload JSON Files to the Corresponding Backup Folder.
  7. Search Existing Backup Folders on Google Drive and filter out backups older than 7 days.
  8. Delete Expired Backup Folders to Free Up Storage Space.
  9. Send Backup Completion Notification and Access Link via Telegram.

Involved Systems and Services

  • n8n API: To fetch existing workflow data.
  • Google Drive: For creating backup folders, storing JSON files, and managing backup versions.
  • Telegram: To send backup completion notifications.
  • JavaScript Code Node: Implements logic for filtering expired backup folders.

Target Users and Value Proposition

  • Automation engineers and developers seeking to safeguard workflow data.
  • Teams aiming to streamline backup processes and improve backup efficiency.
  • Small to medium-sized enterprises requiring backup version management and storage control.
  • Users pursuing automated notifications and enhanced operational transparency.

This workflow enables automated and standardized backups of n8n workflows, ensuring the security and manageability of critical automation logic data. Combined with a backup retention policy and real-time notifications, it minimizes the risk of data loss while enhancing operational efficiency and user experience.