Back up n8n workflows to google drive while preserving folder structure — Flujo de trabajo n8n

Alta complejidad Disparador154 nodos👩‍💻 IT Ops👁 36 vistaspor Adam ABDELMOUMNI

Descripción general

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

Nodos utilizados

Google SheetsHTTP RequestGoogle DriveCode

Vista previa del flujo de trabajo

3/ Get project folder(s) and add names in n8n
4/ Assign the folder's fullPath value
5/ Get workflow + folder relation with full p
8/ Upload each JSON workflow file into its go
root folder(s) : full_path = 1
subfolders : full_path>1
7/ Assign "parent_google_folderid" value in "
Assign "parent_google_folderid" value to root
Assign "parent_google_folderid" value to sub
workflows at the main root folder location
workflows in other folders
1/ Initialize n8n instance access details to
6/ Upload the n8n folder structure in gdrive
+ add the "google_folder_id" of each folder in table "f
- for uploaded folder https://drive.google.com/drive/u/
Backup n8n workflows to Google Drive with aut
This template solves that for any n8n setup (cloud or s
Add your n8n URL and credentials here
URL without the "/" at the end
2/ Create the n8n data tables "folders" & "wo
Connect to the account using API to get the "
{{ $json.headers["set-cookie"][0] }}
n8n tables used to store the folder/subfolder
We use n8n table instead of google sheet because gsheet
We order the folders to be created on google
The smallest full_path length will be the first.
We start from the top root folde
We get the id of each created folder into goo
Branch for workflow(s) at the main_root of yo
Branch for workflow(s) under at list one fold
Create manually your google drive folder "bac
Capture both n8n dataTableId for "folders" an
9/ Save n8n tables data "workflows" and "fold
1/ Initialize n8n instance access details to
Add your n8n URL and credentials here
URL without the "/" at the end
2/ Create the n8n data tables "folders_restor
Connect to the account using API to get the "
{{ $json.headers["set-cookie"][0] }}
n8n tables used to store the folder/subfolder
We use n8n table instead of google sheet because gsheet
Specify the exact drive backup folder name to
root folder(s) : full_path = 1
subfolders : full_path>1
Gets the related gsheet "workflows_folders_ba
3/ Creates the folder/subfolder structure und
4/ Download workflow JSON files from GDrive b
Create the workflow under its n8n folder alon
Add to the JSON workflow data :
- set active to "false"
- workflow name
- parentFolder name
Backup workflows solution to google Drive
Restore Backup workflows to n8n from google D
Creates "backup restored" folder on n8n
n8n login API1
get subfolder(s) structure
M
Merge
Search if folder already…
I
if folder not found => c…
A
Attach the parentFolder …
I
if parentFolder empty
Create folder under the …
S
Split Out3
M
Merge1
M
Merge2
W
wf_id + wf_name
R
root folder : backup_n8n
M
Merge3
M
Merge6
A
Aggregate3
S
Split Out1
R
Remove Duplicates
R
rename fields
R
rename fields1
R
rename main_root_folder …
Create folder under the …
R
rename fields2
R
rename fields3
G
get directParentFolderName
S
Split root vs subfolders
M
Merge4
R
Remove Duplicates1
R
rename fields4
R
rename fields5
R
rename fields6
I
If there parentFolder.is…
R
Remove Duplicates2
M
Merge5
R
rename fields7
Upload file to its folder
R
root folder : backup_n8n1
I
If parentFolder is null
I
If resource == "folder"
Define & assign folder's…
get all workflows
E
extract each workflow
Create backup folder "n8…
S
Sort to get root folders…
D
define full_path length
O
One run per folder
get all workflows1
K
keep only workflows not …
K
keep only workflows not …
A
add wf_folder_name
remove the [] wrapper to…
N
n8n-auth for n8n API
C
Convert workflow to JSON…
Upload file to gdrive ma…
N
n8n instance/project acc…
create n8n table "folders"
create n8n table "workfl…
"folders" table columns …
"workflows" table column…
get projectId
add columns to "folders"…
add columns to "workflow…
G
get all folders2
A
add backup_folder google…
A
Add data about folder : …
G
get parent_google_folde…
G
get all folders1
P
parentFolder
U
Upsert row(s)4
U
Upsert row(s)5
G
Get row(s)3
G
get main root folder det…
G
get related folder detai…
A
add workflow file and fo…
A
add workflow file and fo…
A
Add data about folder : …
E
exclude field "id"
P
Purge data in "folders"
I
Insert data into table "…
G
Get all folders
I
Insert "full_path" value…
M
Match workflow with fold…
I
Insert workflow details …
G
Get the parentFolderName…
G
get parentFolderId if it…
Get each workflow JSON d…
GET each workflow JSON d…
A
Aggregate
I
Insert one row in "folde…
get n8n table "id"
S
Split Out
get n8n table "id"1
S
Split Out2
F
Filter on "folders" table
F
Filter on "workflows" ta…
P
Purge data in "workflows"
L
Loop Over Items
one item per workflow at…
Create gsheet "workflows…
Move file to backup driv…
F
folders details
W
workflows details
G
Get "main_root_folder_go…
Copy data to sheet "work…
Copy data to sheet "fold…
n8n login API2
create n8n table "folder…
"folders_restore_backup"…
add columns to "folders_…
F
Filter on "folders_resto…
P
Purge data in "folders_r…
I
Insert data into table "…
F
fullPath length1
F
Filter
A
Aggregate1
A
Attach the parentFolder …
I
if parentFolder empty1
O
One run per folder1
G
Get the parentFolderName…
G
get parentFolderId if it…
G
Get the parentFolderName…
M
Merge7
create n8n folder3
U
Upsert row(s)3
create n8n folder4
add "active" key to JSON…
create main backup n8n f…
Create workflow JSON fil…
Get row(s) in sheet
E
exclude "main_root_backu…
Search for the backup fo…
Get related gsheet "work…
O
Order by full_path lengt…
Get all n8n folders from…
Get workflows details
G
Get folders_restore_back…
Download JSON wf files
E
Extract JSON from files
E
exclude some fields befo…
R
rename fields8
N
n8n-auth for n8n API1
N
n8n instance/project acc…
get projectId1
get n8n table "id"2
S
Split Out4
R
rename fields9
R
rename fields10
R
rename fields11
U
Upsert row(s)
M
Merge8
R
Remove Duplicates3
A
Aggregate4
R
Restore workflows trigger
B
Backup workflows scheduler
154 nodes166 edges

Cómo funciona

  1. 1

    Disparador

    El flujo de trabajo comienza con un disparador disparador.

  2. 2

    Procesamiento

    Los datos fluyen a través de 154 nodos, connecting aggregate, code, converttofile.

  3. 3

    Salida

    El flujo de trabajo completa su automatización y entrega el resultado al destino configurado.

Detalles de nodos (154)

GO

Google Sheets

googleSheets

#1
HT

HTTP Request

httpRequest

#2
GO

Google Drive

googleDrive

#3
CO

Code

code

#4

Cómo importar este flujo de trabajo

  1. 1Haz clic en el botón Descargar JSON a la derecha para guardar el archivo del flujo de trabajo.
  2. 2Abre tu instancia de n8n. Ve a Flujos de trabajo → Nuevo → Importar desde archivo.
  3. 3Selecciona el archivo back-up-n8n-workflows-to-google-drive-while-preserving-folder-structure descargado y haz clic en Importar.
  4. 4Configura las credenciales para cada nodo de servicio (claves API, OAuth, etc.).
  5. 5Haz clic en Probar flujo de trabajo para verificar que todo funcione, luego actívalo.

O pega directamente en n8n → Importar desde JSON:

{ "name": "Back up n8n workflows to google drive while preserving folder structure", "nodes": [...], ...}

Integraciones

aggregatecodeconverttofiledatatableextractfromfilefiltergoogledrivegooglesheetshttprequestifmanualtriggermergeremoveduplicatesscheduletriggersetsortsplitinbatchessplitout

Obtener este flujo de trabajo

Descarga e importa con un solo clic

Descargar JSONVer en n8n.io
Nodos154
Complejidadhigh
Disparadortrigger
Vistas36
CategoríaIT Ops

Creado por

Adam ABDELMOUMNI

Adam ABDELMOUMNI

@adamabdelmoumni

Etiquetas

aggregatecodeconverttofiledatatableextractfromfilefiltergoogledrivegooglesheetshttprequestif

¿Nuevo en n8n?

n8n es una herramienta de automatización de flujos de trabajo gratuita y de código abierto. Alójala tú mismo o usa la versión en la nube.

Obtener n8n gratis →

Related IT Ops Workflows

GMGOIFOP+2
medium

AI Third-Party Risk Assessment & Vendor Onboarding in n8n

Manual vendor risk assessments are a bottleneck for modern compliance teams. This automated workflow streamlines the entire Third-Party Risk Management (TPRM) lifecycle by integrating AI intelligence with your existing tech stack. The process triggers via a Webhook (such as a form submission), where OpenAI analyzes vendor documentation, data access levels, and security certifications to determine an objective risk tier. By applying logic-based filtering, the flow automatically categorizes vendors into Low, Standard, or Critical risk profiles. It then logs all due diligence data into Google Sheets for a permanent audit trail and sends personalized status notifications via Gmail to procurement stakeholders. This eliminates manual data entry and ensures that every vendor undergoes the same rigorous scrutiny. Whether you are preparing for a SOC2 audit or managing a growing supply chain, this automation provides a scalable, traceable, and AI-enhanced framework for governance, risk, and compliance (GRC) without the overhead of expensive enterprise software. **Common Use Cases:** - Automated SOC2/ISO 27001 evidence gathering for vendor audits - High-speed security screening for SaaS procurement requests - Continuous supply chain monitoring and risk tiering database

🔗 Webhook·6 nodes
GMGOOPSW+1
medium

AI Lead Nurturing & Routing for FinTech (n8n & OpenAI)

Transform your financial services firm into a high-conversion machine with this automated lead management framework. This n8n workflow eliminates the friction of manual data entry and generic follow-ups by leveraging OpenAI to generate hyper-personalized email responses based on specific prospect intent. Whether you are managing credit repair inquiries or insurance applications, the system acts as an intelligent virtual assistant that categorizes incoming webhooks in real-time. The process begins when a lead is captured via your frontend (such as Lovable or a custom landing page). The workflow utilizes an advanced Switch logic to segment prospects into specialized funnels—Business Funding, Life Insurance, or Recruitment. OpenAI then analyzes the lead's unique profile to draft a context-aware email that addresses their specific pain points, which is automatically dispatched via Gmail. Simultaneously, all lead data and AI-generated insights are logged into Google Sheets, providing your sales team with a centralized, up-to-date CRM. This automation ensures a zero-latency response time, significantly increasing your chances of conversion while freeing your team from repetitive administrative tasks. **Common Use Cases:** - Automated qualification and personalized outreach for commercial loan applicants. - Dynamic recruitment funnels for scaling independent insurance agencies. - High-touch lead nurturing for credit restoration and financial consulting services.

🔗 Webhook·14 nodes
@ACOGOGO+4
medium

Automate Amazon Review Sentiment Analysis with Gemini AI

Transform raw customer feedback into actionable product intelligence with this advanced n8n automation. This workflow eliminates the manual drudgery of sorting through thousands of Amazon reviews by leveraging the Apify scraper to extract high-intent data. Once retrieved, the data is processed through Google Gemini AI, which performs deep sentiment analysis to pinpoint recurring pain points and product defects. Unlike basic scrapers, this system categorizes negative feedback into root causes and generates strategic improvement suggestions to help brands regain their competitive edge. The final insights are systematically logged into Google Sheets and pushed to Slack, ensuring your product development and customer success teams receive real-time alerts on critical issues. By automating this loop, businesses can drastically reduce response times to market trends and improve their Amazon Best Seller Rank (BSR) through data-driven product iterations. This is an essential tool for e-commerce managers and private label sellers looking to operationalize consumer insights without manual data entry. **Common Use Cases:** - Automated Product R&D for Private Label Sellers - Competitor Vulnerability Mapping and Market Research - Customer Experience Monitoring and Slack Alert System

Trigger·8 nodes
medium

AI-Driven School Allergy Safety & Menu Auditing via n8n

This advanced n8n workflow revolutionizes student safety by automating the critical task of dietary cross-referencing. By integrating Google Sheets with AI-powered analysis, the system eliminates human error in high-stakes cafeteria environments. The workflow functions as a proactive safety net: it ingests daily menu data and cross-references it against a centralized database of student allergy profiles and classroom rosters. Using LLM logic, it identifies hidden ingredients or cross-contamination risks that standard keyword searches might miss. When a conflict is detected—such as a gluten-sensitive student being scheduled for a meal containing wheat—the system triggers an instant Slack notification to nutritionists and teachers. Beyond immediate alerts, the flow generates AI-suggested menu alternatives to ensure every student has a safe, nutritious meal option. This automation not only ensures strict compliance with health regulations but also saves administrative staff hours of manual spreadsheet auditing, allowing them to focus on meal quality rather than data entry. **Common Use Cases:** - Real-time dietary conflict alerting for school cafeterias - Automated ingredient cross-referencing for institutional catering - AI-powered meal substitution planning for healthcare facilities

▶️ Manual·6 nodes
FUGOIFME+2
medium

Automate Inventory Tracking: Google Sheets & Slack (n8n)

Stop manual stock monitoring and prevent lost revenue with this automated Order Management System (OMS) template. This high-efficiency n8n workflow bridges the gap between your sales channels and warehouse operations. When a new order triggers the API webhook, the system instantly cross-references SKU data against your Google Sheets master inventory. By utilizing advanced logic and merge nodes, the workflow calculates availability in real-time. If stock levels are sufficient, it updates your records; if a shortage is detected, it sends an immediate, actionable alert to your team via Slack. This automation is designed for growing e-commerce businesses that need to eliminate human error in fulfillment. Instead of reactive firefighting when items sell out, your operations team can proactively manage supply chains. The flow handles complex data parsing through custom function nodes, ensuring that even multi-item orders are processed with precision, ultimately reducing operational overhead and improving the customer experience by preventing backorder frustrations. **Common Use Cases:** - E-commerce fulfillment automation for Shopify or WooCommerce stores using Google Sheets as a lightweight ERP. - Real-time low-stock alerting for high-volume hardware or electronics distributors to prevent supply chain bottlenecks. - Automated internal requisition tracking for large corporate offices managing hardware assets and office supplies.

🔗 Webhook·13 nodes
COGOMAME+5
high

Automate GitHub Talent Sourcing to Google Sheets via n8n

Stop manual profile hunting and transform your technical recruitment with this high-performance n8n automation. This workflow leverages BrowserAct to perform deep-tissue scraping of GitHub user profiles, extracting mission-critical data points—including repository history, tech stacks, and recent coding activity—directly into structured Google Sheets reports. By automating the data enrichment phase, technical recruiters and HR teams can bypass hours of manual copy-pasting, ensuring a real-time database of pre-qualified developer talent. The flow operates by triggering a batch process that iterates through a list of GitHub handles, utilizing BrowserAct’s stealth scraping capabilities to bypass complex web barriers. Once the data is captured, a custom Code node cleans and formats the JSON output before merging it into a multi-tab Google Sheet for granular reporting. Finally, the workflow sends a summary notification via Slack to alert your team of new candidate insights. This is an essential blueprint for data-driven talent acquisition and competitive business intelligence, providing a seamless bridge between raw GitHub data and actionable recruitment pipelines. **Common Use Cases:** - Automated Technical Talent Mapping for Recruitment Agencies - Developer Outreach Enrichment for Open Source Project Growth - Competitive Intelligence and Tech Stack Analysis for BI Teams

Trigger·19 nodes