Skip to main content

Back up workflows to Google Drive daily with automatic cleanup

Workflow preview

Workflow preview
100%
Back up workflows to Google Drive daily with automatic cleanup preview
Open on n8n.io

1. Workflow Overview

This workflow automatically creates daily backups of all n8n workflows and stores them in Google Drive, using the n8n API to export workflows and a scheduled retention policy to keep storage organi...

Best for

  • DevOps automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.if, n8n-nodes-base.scheduletrigger, n8n-nodes-base.stickynote, n8n-nodes-base.googledrive, n8n-nodes-base.converttofile, n8n-nodes-base.httprequest, n8n-nodes-base.wait, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Evilasio Ferreira.

Original n8n.io source

1.1 Workflow description

Title
Back up workflows to Google Drive daily with automatic cleanup
Workflow name
Back up workflows to Google Drive daily with automatic cleanup

This workflow automatically creates daily backups of all n8n workflows and stores them in Google Drive, using the n8n API to export workflows and a scheduled retention policy to keep storage organized.

The automation runs in two stages: backup and cleanup.

Daily Backup Process

A Schedule Trigger runs at a defined time each day.

The workflow creates a folder in Google Drive using the current date.

It calls the n8n API to retrieve the list of all workflows.

Each workflow is processed individually and converted into a .json file.

The files are uploaded to the daily backup folder in Google Drive.

This ensures that every workflow is safely stored and versioned by date.

Automatic Cleanup

A second scheduled process maintains storage hygiene:

The workflow lists all backup folders in the Google Drive root directory.

It checks the folder creation date.

Any folder older than the defined retention period (default 15 days) is automatically deleted.

This prevents unnecessary storage usage while keeping recent backups easily accessible.

Key Features

Automated daily workflow backups

Uses n8n API to export workflows

Files stored in Google Drive

Automatic retention cleanup

Fully documented with sticky notes inside the workflow

Uses secure credentials (no hardcoded API keys)

Setup

Configuration takes only a few minutes:

Connect a Google Drive OAuth credential

Define the Google Drive root folder ID for backups

Configure n8n API credentials securely

Adjust:

Backup schedule

Retention period (default 15 days)

Once configured, the workflow will run automatically, creating daily backups and removing old ones without manual intervention.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - >15d

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 2 - start4h

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 3 - start3h

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 4 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Create folder

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 7 - ConvertToJson

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 8 - apiN8N

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - 5s

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 10 - Delete folder

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 11 - Split

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - get folder

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 13 - Check date

Type / Role
n8n-nodes-base.dateTime - dateTime
Config choices
Version 2

Block 14 - Format data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - upload file

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 16 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Back up workflows to Google Drive daily with automatic cleanup
Complexity advanced
Nodes 16
Categories DevOps
Author Evilasio Ferreira
Published 04 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13866/13866.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Back up workflows to Google Drive daily with automatic cleanup do?

This workflow automatically creates daily backups of all n8n workflows and stores them in Google Drive, using the n8n API to export workflows and a scheduled retention policy to keep storage organi...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps use case.