Skip to main content

Automated workflow backup to Google Drive with smart cleanup

Workflow preview

Workflow preview
100%
Automated workflow backup to Google Drive with smart cleanup preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow provides a complete, automated backup solution for your n8n instance, running on a daily schedule to ensure your automations are always safe. Automatic cleanup: It first ...

Best for

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

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.manualtrigger, n8n-nodes-base.googledrive, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.n8n, n8n-nodes-base.converttofile

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Automated workflow backup to Google Drive with smart cleanup
Workflow name
Automated workflow backup to Google Drive with smart cleanup

How it works

This workflow provides a complete, automated backup solution for your n8n instance, running on a daily schedule to ensure your automations are always safe.

  • Automatic cleanup: It first connects to your Google Drive to find and delete old backup folders, keeping your storage clean and organized based on a retention number you set.
  • Daily folder creation: It then creates a new, neatly dated folder to store the current day's backup.
  • Fetches & saves workflows: Finally, it uses the n8n API to get a list of all your workflows, converts each one to a .json file, and uploads them to the newly created folder in Google Drive.

Set up steps

Setup time: ~3 minutes

This template is designed to be as plug-and-play as possible. All configurations are grouped in a single node for quick setup.

  • Connect your accounts: Authenticate the Google Drive and n8n API nodes with your credentials.
  • Configure main settings: Open the Set node named "CONFIG - Set your variables here" and:
    • Paste the ID of your main Google Drive folder where backups will be stored.
    • Adjust the number of recent backups you want to keep.
  • Activate workflow: Turn on the workflow. Your automated backup system is now active.

For more detailed instructions, including how to find your Google Drive folder ID, please refer to the sticky notes inside the workflow.

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 - Schedule Trigger

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

Block 2 - Manual trigger

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

Block 3 - Search files and folders

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

Block 4 - Start cleanup (run once)

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

Block 5 - Sort and isolate old folders

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

Block 6 - Loop over folders to delete

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

Block 7 - Loop over each workflow

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

Block 8 - Get all n8n workflows

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

Block 9 - Create new backup folder

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

Block 10 - Convert workflow to file

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

Block 11 - Upload workflow to Google Drive

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

Block 12 - Delete old folder

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

Block 13 - CONFIG - Set your variables here

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

Block 14 - Sticky Note

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

Block 15 - Sticky Note1

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

Block 16 - Sticky Note2

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

Block 17 - Sticky Note3

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

3. Summary Table

Workflow Automated workflow backup to Google Drive with smart cleanup
Complexity advanced
Nodes 17
Categories DevOps, Multimodal AI
Author Luca Olovrap
Published 17 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7512/7512.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 Automated workflow backup to Google Drive with smart cleanup do?

How it works This workflow provides a complete, automated backup solution for your n8n instance, running on a daily schedule to ensure your automations are always safe. Automatic cleanup: It first ...

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, Multimodal AI use case.