Automated Google Drive Structure Generator - n8n Workflow

Use this powerful n8n workflow to automatically generate standardized Google Drive folder structures from a predefined template. Perfect for agencies needing consistent project organization, leveraging an n8n trigger and Google Apps Script.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Agencies and Freelancers: Who need to create consistent, standardized client or project folder setups quickly.
Operations Managers: Seeking to enforce strict organizational standards across large teams.
Technical Users: Who want to combine the power of n8n automation with custom Google Apps Script logic.
Anyone looking for efficient n8n templates for file operations.

Overview

Maintaining consistent folder structures is crucial for organizational efficiency, but manually duplicating and renaming files and folders is tedious and error-prone. This n8n workflow solves this by providing a hands-off, automated solution. The core functionality relies on a custom Google Apps Script, which is triggered by this n8n automation to handle the recursive duplication of a template folder and automatic replacement of placeholders (like {{NAME}}) within all duplicated files and subfolders.

This setup utilizes an n8n node dedicated to form input, ensuring a smooth user experience. The resulting n8n workflow is a robust tool for scaling standardized project initialization, saving significant administrative time.

How it Works

This n8n workflow operates in three distinct phases, starting with a user submission via a Form Trigger, which acts as the initial n8n trigger.


  1. Data Capture (Form Trigger): The process begins when a user submits the Folder Request Form, providing the essential name for the new project or client (e.g., 'Acme Corporation'). This submission immediately fires the n8n trigger.

  2. Base Folder Creation (Google Drive): The n8n node for Google Drive immediately takes the submitted name and creates the top-level destination folder in the configured parent directory. This ensures the main container is ready for the structure copy.

  3. Template Duplication (Apps Script via HTTP Request): After a short pause (using the Wait n8n node to ensure synchronization), the workflow executes the Duplicate Template n8n node. This node is configured as an HTTP Request that calls the deployed Google Apps Script URL. It securely passes the newly created destination folder ID, the template folder ID, and the submitted name. The Apps Script then handles the complex, recursive duplication of the template structure and replaces all {{NAME}} placeholders automatically. This entire n8n workflow ensures a complete, standardized folder structure is ready instantly.

Installation Guide

To deploy this powerful n8n templates solution, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON and import it into your n8n instance.

  2. Configure Credentials: Set up your Google Drive credentials to allow the n8n node to interact with your Drive.

  3. Create Template Structure: In Google Drive, design your template folder structure, ensuring you use the placeholder {{NAME}} wherever the new client or project name needs to appear (in folder names or file contents).

  4. Deploy Apps Script: Crucially, you must deploy the required Google Apps Script (provided in the original template documentation) as a Web App, ensuring access is set to 'Anyone'. Copy the resulting deployment URL.

  5. Update Placeholders in the n8n Workflow: Navigate through the n8n nodes and update the following configuration values:

In the Create Main Folder n8n node: Replace DESTINATIONPARENTFOLDERID with the ID of the folder where all new client folders should reside.
In the Duplicate Template n8n node: Replace YOUR
APPSSCRIPTURL with the URL copied in step
4.
* In the Duplicate Template n8n node: Replace YOURTEMPLATEFOLDER_ID with the ID of your source template folder.

Node Details

Folder Request Form (Form Trigger n8n trigger):
Function: Acts as the entry point for the n8n workflow, exposing a public form for users to input the required name.
Key Configuration: Defines one mandatory field labeled 'Name'.

Create Main Folder (Google Drive n8n node):
Function: Creates the highest-level directory, naming it dynamically using the input received from the n8n trigger (={{ $json.Name }}).
Key Configuration: Resource set to folder, using the placeholder ID for the parent folder.

Wait for Drive (Wait n8n node):
Function: Inserts a brief pause to allow Google Drive's internal synchronization processes to complete before the Apps Script attempts to access the newly created folder ID. This prevents race conditions.

Duplicate Template (HTTP Request n8n node):
Function: Executes the critical step of the n8n workflow by calling the external Google Apps Script deployment to initiate recursive folder duplication and placeholder replacement.
* Key Configuration: Uses the POST method. Passes three query parameters: templateFolderId, the dynamic name (from the initial n8n trigger), and the destinationFolderId (output from the Create Main Folder n8n node).

Related n8n Workflows

Free

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

Featured*