⚙️ Back up self-hosted workflows to Google Drive daily with change detection

180 views · ⚙️ DevOps & CI/CD

Description

This workflow creates a daily, automated backup of all workflows in a self-hosted n8n instance and stores them in Google Drive. Instead of exporting every workflow on every run, it uses content hashing to detect meaningful changes and only updates backups when a workflow has actually been modified.

To keep Google Drive clean and predictable, the workflow intentionally deletes the existing backup file before uploading the updated version. This avoids duplicate files and ensures there is always one authoritative backup per workflow.

A Data Table is used as an index to track workflow IDs, hash values, and timestamps. This allows the workflow to quickly determine whether a workflow already exists, whether its content has changed, or whether it should be skipped entirely.

How it works

Setup steps

🔗 Nodes Used

HTTP Request, Google Drive, Schedule Trigger, Data table

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup