Automated Workflow Backup to Google Drive - n8n Workflow

Use this powerful n8n workflow to automatically backup all your critical n8n templates and configurations to Google Drive, ensuring data safety and easy recovery.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Teams and agencies running business-critical processes on n8n.

  • n8n developers who need reliable version control and off-site backup for their custom n8n workflow creations.

  • System administrators focused on devops and data redundancy for self-hosted n8n instances.

Overview

Running business operations on n8n demands a robust backup strategy. This sophisticated n8n workflow provides a hands-free solution for achieving data redundancy. Every week (or on demand), this automation uses the internal n8n API to pull the definitions of all active n8n workflows. It then systematically converts each definition into a standard JSON file and stores it securely in Google Drive. This system protects against accidental deletion or instance failure, making recovery straightforward by simply importing the backed-up n8n templates. The included cleanup mechanism ensures your Google Drive storage remains tidy by periodically removing older backup folders, establishing a reliable devops procedure using this powerful n8n node structure.

How it Works

The entire process is initiated by an n8n trigger, either manually via the Manual trigger n8n node or automatically via the Schedule Trigger n8n node, configured for weekly execution.


  1. Initialization: The n8n workflow first executes the Create new folder Google Drive n8n node, setting up a timestamped folder (e.g., Workflow Backups 15-01-2024).

  2. Extraction: The Get n8n workflow n8n node uses the internal n8n API credentials to retrieve the definitions for all current n8n templates and workflows.

  3. Processing Loop: The flow enters a loop (Split In Batches) to handle each n8n workflow individually.

  4. File Generation & Upload: For every item, the Convert to File n8n node transforms the JSON data into a file object. This file is then uploaded using the Upload workflow n8n node to the newly created Google Drive folder.

  5. Cleanup (Optional Devops): After all files are uploaded, a separate path cleans up old backups. The flow identifies all existing backup folders, uses the Filter n8n node to exclude the current, freshly created folder (protecting this new backup), and finally uses the delete folder n8n node to permanently remove the redundant, older backup directories.

Installation Guide


  1. Import the n8n workflow: Import the provided JSON into your n8n instance.

  2. Configure Google Drive Credentials: Ensure you have Google Drive OAuth2 credentials set up. Replace the placeholder credentials in the Create new folder, Get folders, Upload workflow, and delete folder n8n node instances with your active Google Drive credentials.

  3. Configure n8n API Credentials: Set up n8n API credentials (which require a valid API key from your instance) and replace the credentials in the Get n8n workflow n8n node.

  4. Set Target Folder: In the Create new folder n8n node, update the folderId parameter to point to the parent directory on your Google Drive where you want the backups to be stored.

  5. Select Trigger: Choose your preferred n8n trigger: run manually or activate the Schedule Trigger n8n node to run weekly automatically.

Node Details

Schedule Trigger / Manual trigger: The primary n8n trigger starting the backup process. The Schedule Trigger ensures continuous, hands-free operation.
Create new folder (Google Drive): Creates a unique, timestamped folder for the current backup batch. This n8n node uses an expression to incorporate the current date into the folder name.
Get n8n workflow (n8n node): A critical n8n node that communicates with the n8n instance API to fetch the JSON definition of every active n8n workflow.
Loop (Split In Batches): Manages the iteration process, guaranteeing every individual n8n workflow definition is processed and backed up.
Convert to File (n8n node): Converts the workflow JSON data into a binary file format, ensuring the exported files use the correct .json extension.
Upload workflow (Google Drive n8n node): The core action n8n node responsible for saving the generated file to Google Drive.
Filter (n8n node): Essential for the cleanup process. It filters the list of existing folders to prevent the current backup folder from being deleted, protecting the latest n8n templates backup.
delete folder (Google Drive n8n node): Handles the automatic cleanup, removing old backup directories to maintain storage hygiene, a key devops function for this n8n workflow.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

AI Automation Expert | Web & Mobile App Integrator With 2+ years of experience, I build smart automations, web & mobile app workflows, and scalable platforms using tools like n8n, Make, and more. I help businesses reduce operational costs, save time, and scale faster with AI-powered solutions. For business enquiries, send me an email at [email protected]

Featured*