# n8n Workflow Backup to Google Drive

**Category:** IT Ops  
**Tools:** Google Drive, Google Sheets, n8n  
**Nodes:** 16  
**Built by:** Forgent Systems

Backs up every n8n workflow to Google Drive on a schedule, one subfolder per workflow, and only saves a new copy when a workflow has actually changed. A Google Sheet keeps the index.

![Workflow](preview.webp)

## How it works

1. On schedule, all workflows are fetched through the n8n API.
2. Each workflow gets its own Drive subfolder, created if missing.
3. The sheet is checked to see whether the workflow changed since the last backup.
4. Changed or new workflows are saved as JSON files and the index is updated.

## Use cases

- Self-hosted n8n instances
- Agencies managing client automations
- Version history and disaster recovery

## Data setup

**Google Sheets** (tab: columns)

- **Workflow Backup → Sheet1**: `id`, `Name`, `Last Backup`, `Folder link`, `Last Updated`

## Setup

1. In n8n open **Workflows → Import from File** and choose `workflow.json`.
2. Connect these credentials:
   - Google Drive account
   - Google Sheets account
   - n8n account
3. Point the Sheets / Airtable / Drive / Slack nodes at your own resources (structure above).
4. Replace placeholder emails, phone numbers and `YOUR-FORM-ID` links with your own.
5. Times use the America/New_York timezone and dates use MM/DD/YYYY. Adjust if needed.
6. Run a test execution, then activate.

## Nodes

- **Loop Over Data** — `n8n-nodes-base.splitInBatches`
- **Schedule Trigger** — `n8n-nodes-base.scheduleTrigger`
- **Get all n8n Workflow** — `n8n-nodes-base.n8n`
- **Append row in sheet** — `n8n-nodes-base.googleSheets`
- **Store File in Subfolder** — `n8n-nodes-base.googleDrive`
- **Search Subfolder** — `n8n-nodes-base.googleDrive`
- **If Exists** — `n8n-nodes-base.if`
- **Create SubFolder** — `n8n-nodes-base.googleDrive`
- **Get n8n File** — `n8n-nodes-base.code`
- **Set Subfolder Id** — `n8n-nodes-base.set`
- **Append or update row in sheet** — `n8n-nodes-base.googleSheets`
- **If Updated Date Changed** — `n8n-nodes-base.if`
- **If Not Exists** — `n8n-nodes-base.if`
- **Get Flow Record** — `n8n-nodes-base.googleSheets`
- **Sticky Note7** — `n8n-nodes-base.stickyNote`
- **Get Existing Workflow** — `n8n-nodes-base.googleSheets`
