Automated Daily Workflow Backup to Google Drive - n8n Workflow

Use this robust n8n workflow to automatically backup all your existing n8n workflow designs daily to Google Drive. This n8n template ensures essential system redundancy and disaster recovery.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • n8n Administrators and System Owners who need configuration redundancy.

  • DevOps Engineers managing critical automation infrastructure.

  • Users running vital processes who cannot risk losing their core n8n workflow logic.

  • Anyone looking for a reliable, scheduled n8n template for data preservation.

Overview

Maintaining reliable n8n infrastructure requires a solid disaster recovery strategy. This automation solves the critical problem of configuration loss by providing a scheduled backup of every single n8n workflow currently deployed on your instance.

This robust n8n workflow utilizes the internal n8n API endpoints to programmatically extract the JSON definitions of all your workflows. It then bundles these definitions and uploads them as .json files to a specified folder in Google Drive. This ensures that even if your primary n8n server fails, you have an external, up-to-date archive of all your custom automation logic, making recovery instantaneous. It's an indispensable n8n node configuration for stability.

How it Works

This automation is triggered daily at 2:30 AM via the Cron n8n trigger, though a manual trigger is included for immediate testing. The flow proceeds through several key stages:


  1. List Workflows: The Get Workflow List n8n node, configured as an HTTP Request, calls your n8n instance's /rest/workflows endpoint using Basic Authentication. This retrieves a list of all existing n8n workflow IDs and names.

  2. Mapping and Iteration: The Map n8n node processes the resulting list, splitting the data so that subsequent nodes can iterate over each workflow ID individually.

  3. Fetch Details: The Get Workflow HTTP Request n8n node fetches the detailed JSON definition for each specific workflow ID using the /rest/workflows/{id} endpoint.

  4. Data Consolidation: The Merge n8n node combines the original item (containing the workflow name) with the newly fetched workflow JSON content. This is crucial for naming the backup file accurately.

  5. Preparation: The FunctionItem and Move Binary Data n8n node ensure the JSON structure is correctly converted into binary data, preparing it for file upload.

  6. Final Storage: The Google Drive n8n node receives the binary data, names the file using the workflow's name (e.g., MyWorkflow.json), and uploads it to the designated backup folder, completing the daily backup of your critical n8n templates.

Installation Guide


  1. Import the n8n Workflow: Copy the provided JSON code and import it directly into your n8n instance via the 'New' -> 'Import from JSON' option.

  2. Configure n8n API Credentials: This n8n workflow requires credentials to access your own n8n instance API. Set up a 'Basic Auth' credential named n8n Creds (or update the credentials in the Get Workflow List and Get Workflow nodes).

* Username/Password: Use your n8n instance's API key credentials or admin credentials.

  1. Configure Google Drive Credentials: Set up a Google API credential for Google Drive access and apply it to the Google Drive n8n node.

  2. Set Destination Folder: In the Google Drive n8n node, replace the placeholder text in the 'Parents' field with the specific Folder ID from your Google Drive where you wish to store the backups. The folder ID is found in the URL when viewing the folder in your browser.

  3. Activate: Enable the Run Daily at 2:30am n8n trigger to schedule the automatic backups.

Node Details

Run Daily at 2:30am (Cron): The primary n8n trigger, scheduled to execute the backup process every morning at 2:30 AM.
Get Workflow List (HTTP Request n8n node): Fetches metadata about all deployed n8n templates from the local n8n API endpoint (/rest/workflows). Requires Basic Auth credentials.
Map (Function n8n node): Takes the array output of workflow lists and maps each workflow item to a new execution item, enabling parallel processing of each individual n8n workflow.
Get Workflow (HTTP Request n8n node): Dynamically retrieves the full JSON definition of a single n8n workflow based on its ID.
Merge (Merge n8n node): Combines the workflow metadata (like the name) with the actual JSON content, using 'Merge By Index' mode.
Move Binary Data (n8n node): Converts the final merged JSON data into a binary file format, suitable for cloud upload.


  • Google Drive (n8n node): Handles the file transfer, uploading the workflow JSON definition using the name extracted from the upstream data (e.g., Workflow Name.json) into the specified Google Drive folder.

Related n8n Workflows

Free

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

Accélérateur de Chiffre d'Affaires : Automatisez votre entreprise pour la rendre plus visible sur Google, pour trouver de nouveaux Clients, pour gagner du temps

Featured*