Skip to main content

Back up n8n workflows to google drive while preserving folder structure

Workflow preview

Workflow preview
100%
Back up n8n workflows to google drive while preserving folder structure preview
Open on n8n.io

1. Workflow Overview

Back up & restore n8n workflows with preserved folder structure with GoogleDrive A. Backup workflows solution to google Drive What problem does this workflow solve? If you’re building and managin...

Best for

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

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.stickynote, n8n-nodes-base.merge, n8n-nodes-base.googledrive, n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.splitout, n8n-nodes-base.aggregate

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Back up n8n workflows to google drive while preserving folder structure
Workflow name
Back up n8n workflows to google drive while preserving folder structure

Back up & restore n8n workflows with preserved folder structure with GoogleDrive

A. Backup workflows solution to google Drive

✅ What problem does this workflow solve?

If you’re building and managing multiple automations with well-organized nested folders structure, then, losing a workflow due to accidental deletion or misconfiguration, can cost you hours of work and headache.

This can be even more impactful for self-hosted n8n instances.

This template solves that for any n8n setup (cloud or self hosted) by exporting a perfect mirrored setup of a whole n8n project, preserving the nested folder structure and the workflows within it.

All of it is uploaded in google drive under one main backup folder per execution to keep track of different setup versions along time.

🧑‍💻Who’s it for ?

This workflow is ideal for any n8n user, from beginner to advanced solo/team “flowgrammer” who wants to have a reliable, safe, automated and easy to access backup solution that reflects a perfect mirror of their n8n setup.

✨What it does

  • Scheduled Execution: The workflow runs automatically according to the schedule, could be up to X times a day (or can be triggered manually).

  • Creates backup Folder: It creates a new overall backup folder with a naming convention as “n8n_backup_folder_structure_DDMMYYYY_HHmmss” (i.e “n8n_backup_folder_structure_02022026_123343”) where the whole n8n nested folder structure along with workflows (JSON files) will be saved.

For example if an n8n workflow instance look like this, then same structure will be preserved and reflected on google drive along with the workflows within each folder :

 projects-root-folder/
 └── Your-project-folder-name/
 └── Utilities/
└──Error_management/
 └── error_alerting.json
└──Log_analysis/
└── Reports/
 └── Clients/
 └──Client_A/
 └──Client_B/
└── client_reporting_standard.json
 └── ...
└── workflow_test.json
  • Fetches the non documented n8n API: It connects to your n8n instance via the n8n API, not the documented one, but the one used directly from your UI when you manipulate your instance. This API has been used instead of the native n8n node because it gives some more features that are being used here such as :

  • Retrieve the workflow’s parentFolder name

  • Retrieve the workflow’s description

  • Retrieve the n8n instance’s projectId

  • Create an n8n data table

  • Get properties of an n8n data table

🛠️How to set up ?

1. Configure Credentials: Make sure you have valid credentials for :

  • Google Drive: To allow the workflow to create folders and upload files.

2. Set Your Variables: In the first Set node named "n8n instance/project access details":

  • n8n_instance_URL: Paste your n8n instance URL without the “/” at the end. For example : https://myautomations.app.n8n.cloud
  • emailOrLdapLoginId: your login email address
  • password: your password

3. Create your main backup folder: Create on your google drive space the main folder where all your backup will be uploaded. For example “my_n8n_backup” and then select it in the node Create backup folder "n8n_backup_folder_structure_ddMMyyyy_HHmmss" ” from the List under “Parent Folder”,

🚀 Activate the workflow, and you're all set!

B. Restore Backup workflows to n8n from google Drive

You can run it manually by adding the specific google drive backup folder name that you want to restore on n8n inside the node "Search for the backup folder in Drive".

After running the workflow you'll see on your n8n the backup folder restored with all your saved folder/subfolders and associated workflows.

And when you open that folder you'll see all your setup successfully restored!

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 - n8n login API1

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

Block 2 - get subfolder(s) structure

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

Block 3 - Sticky Note

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

Block 4 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 5 - Sticky Note1

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

Block 6 - Sticky Note3

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

Block 7 - Search if folder already exists

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

Block 8 - if folder not found => create it

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

Block 9 - Attach the parentFolder if any

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

Block 10 - if parentFolder empty

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

Block 11 - Create folder under the parentFolder

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

Block 12 - Split Out3

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

Block 13 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 14 - Sticky Note6

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

Block 15 - Merge2

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 16 - wf_id + wf_name

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

Block 17 - root folder : backup_n8n

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

Block 18 - Sticky Note7

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

Block 19 - Sticky Note8

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

Block 20 - Merge3

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 21 - Merge6

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 22 - Sticky Note9

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

Block 23 - Aggregate3

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

Block 24 - Split Out1

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

Showing the first 24 of 195 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Back up n8n workflows to google drive while preserving folder structure
Complexity advanced
Nodes 195
Categories DevOps
Author Adam ABDELMOUMNI
Published 06 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13245/13245.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 n8n workflows to google drive while preserving folder structure do?

Back up & restore n8n workflows with preserved folder structure with GoogleDrive A. Backup workflows solution to google Drive What problem does this workflow solve? If you’re building and managin...

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.