Who is this workflow for? Ensure the safety and integrity of your n8n workflows by automatically backing them up to Google Drive every night. This workflow systematically archives your workflows, organizes them by date, and manages storage by removing outdated backups..

What does this workflow do?

  • Authentication Setup:
  • Google Drive Credentials: Obtain and configure your Google Drive API credentials from the Google Cloud Console.
  • n8n API Key: Generate your n8n API key as guided here.
  • Folder Preparation:
  • Create two folders in Google Drive: n8n_backups for current backups and n8n_old for archived backups. If these folders do not exist, the workflow will prompt you to create them.
  • Backup Process:
  • Schedule Trigger: Set up the workflow to run at a specific time each night.
  • Export Workflows: The workflow retrieves all current n8n workflows using the n8n API.
  • Save to Google Drive: Each workflow is saved as a file in the n8n_backups folder, named with the current date for easy identification.
  • Archiving Previous Backups:
  • Move Backups: The backups from the previous night are moved from n8n_backups to n8n_old.
  • Rename Files: Backups in n8n_old are renamed with their corresponding dates to maintain an organized archive.
  • Automatic Purging:
  • Purge Configuration: Configure the “PURGE DAYS” node to specify how old backups should be before they are deleted. By default, backups older than 30 days are removed.
  • Enable Purge Process: Activate the purge nodes to ensure outdated backups are deleted, maintaining optimal storage usage.
  • Final Activation:
  • Enable Workflow: Turn on the workflow to execute according to the defined schedule, ensuring continuous and automated backups.

🤖 Why Use This Automation Workflow?

  • Automated Backups: Eliminates the need for manual backups, ensuring your workflows are consistently saved without intervention.
  • Organized Storage: Separates current backups from older ones, making it easy to locate specific backups based on dates.
  • Storage Management: Automatically deletes backups older than a set duration, preventing excessive use of storage space.

👨‍💻 Who is This Workflow For?

This workflow is ideal for developers, automation specialists, and organizations that rely on n8n for their automated processes. It is particularly useful for those who manage multiple workflows and need a reliable backup system to safeguard their configurations and workflows.

🎯 Use Cases

  1. Disaster Recovery: Quickly restore your n8n workflows in case of accidental deletions or system failures.
  2. Version Control: Maintain historical versions of your workflows to track changes and revert to previous states if necessary.
  3. Compliance and Auditing: Keep records of workflow configurations for compliance purposes and audits.

TL;DR

This n8n workflow automates the nightly backup of all your n8n workflows to Google Drive, organizes backups by date, and manages storage by removing older backups after a set period. By implementing this workflow, you ensure the reliability and safety of your automated processes with minimal maintenance.

Help us find the best n8n templates

About

A curated directory of the best n8n templates for workflow automations.