Scheduled Automated Workflow Backups to Google Drive - n8n Workflow

Protect your automation investment. Use this n8n workflow template to create scheduled, automated JSON backups of all your active n8n workflow definitions directly to Google Drive.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

n8n Administrators: Who need reliable disaster recovery plans and automated redundancy for their instance.
DevOps Teams: Managing mission-critical automation infrastructure.
High-Availability Users: Anyone running complex, essential n8n workflow setups that cannot risk data loss.
Technical Users: Who need to interact with the internal n8n API using the specialized n8n node.

Overview

Maintaining the integrity of your automation infrastructure is paramount. This highly valuable n8n workflow template provides an essential safeguard against accidental deletion or configuration errors by automatically backing up every deployed n8n workflow definition.

It leverages the specialized internal n8n node to communicate with the n8n API, retrieving the full JSON structure of every active workflow. This structure is then converted into a file and uploaded to Google Drive. By using the reliable n8n trigger for scheduling (set weekly by default), this automation ensures that a current copy of all your hard work is stored securely off-site, making disaster recovery a simple matter of importing the saved JSON files. This robust n8n automation protects your valuable configuration data.

How it Works

This automation operates in four primary stages, initiated by the n8n trigger:


  1. Scheduling and Listing: The Schedule Trigger acts as the primary n8n trigger, initiating the flow according to a defined interval (e.g., weekly). It immediately proceeds to the first n8n node, which uses the n8n API to 'Get many workflows,' fetching a list of all existing workflow IDs and basic metadata on the instance.

  2. Detailed Retrieval (Looping): The flow then iterates through the list of IDs. For each item, a second internal n8n node (set to the 'Get' operation) downloads the complete, detailed JSON definition of that specific n8n workflow.

  3. Data Conversion: The raw JSON data of the workflow definition is processed by the Move Binary Data n8n node. This node transforms the JSON payload into a storable binary file format (a .json file). Crucially, it dynamically generates a safe filename incorporating the workflow's name and ID.

  4. Secure Storage: Finally, the Google Drive n8n node takes the binary file and uploads it to a pre-configured folder in your Google Drive account, ensuring a persistent, secure backup of the n8n workflow configuration is stored remotely.

Installation Guide

To deploy and utilize this n8n workflow template effectively, follow these steps:


  1. Import: Copy the provided JSON data and paste it into your n8n instance via the 'New' menu > 'Import from JSON'.

  2. n8n API Credentials: The 'Get many workflows' and 'Get a workflow' n8n nodes require an n8n API credential configured to interact with your instance's internal API. Ensure this credential has sufficient permissions (usually API Key or Basic Auth with admin access).

  3. Google Drive Setup: Configure the 'Upload file1' Google Drive n8n node:

Set up a Google Drive OAuth credential if you haven't already.
Update the Folder ID parameter to point to the specific Google Drive folder where you want the backups stored. (The current placeholder is YOURFOLDERID).

  1. Schedule: Adjust the 'Schedule Trigger1' n8n trigger node to your preferred interval (e.g., daily, weekly, or monthly).

  2. Activation: Save the n8n workflow and activate it by toggling the main switch.

Node Details

Schedule Trigger: The starting n8n trigger node. Its function is to initiate the backup process automatically at regular, predefined intervals, ensuring consistency.
n8n Node (Get many workflows): Functionally, this node queries the n8n API without specific filters to retrieve a comprehensive list of all existing n8n workflow definitions by ID.
n8n Node (Get a workflow): This node operates in a loop, downloading the full JSON configuration for each individual n8n workflow identified in the previous step, using the expression {{ $json.id }} for dynamic lookup.
Move Binary Data (JSON → File): This vital n8n node converts the raw JSON configuration into an actual file format suitable for uploading. Key configuration includes the jsonToBinary mode and a dynamic filename generation to avoid character conflicts and ensure uniqueness.


  • Google Drive Node (Upload file): This n8n node handles the final persistence step. It takes the binary file generated and uploads it to the designated Google Drive folder. Configuration requires a valid Google Drive credential and specifying the target folder ID.

Related n8n Workflows

Free

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

Featured*