Google Drive + Apps Script: instant client folders
Creating “just one more” client folder is never just one folder. It’s the same subfolders, the same naming, the same copy/paste, and the same little mistakes that show up later.
Account managers feel it when onboarding gets rushed. Agency owners feel it when the team stops following your structure. And if you run ops, you’ve already tried to fix it with a checklist. This Drive folder automation gives you consistent client folders in minutes, without chasing people to do it “the right way.”
You’ll set up a simple intake form that creates a new root folder in Google Drive, calls Google Apps Script to clone your full template, and replaces every {{NAME}} placeholder automatically.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Google Drive + Apps Script: instant client folders
flowchart LR
subgraph sg0["Folder Request Form Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Folder Request Form"]
n1@{ icon: "mdi:cog", form: "rounded", label: "Create Main Folder", pos: "b", h: 48 }
n2@{ icon: "mdi:cog", form: "rounded", label: "Wait for Drive", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Duplicate Template"]
n2 --> n3
n1 --> n2
n0 --> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n3 api
classDef customIcon fill:none,stroke:none
class n0,n3 customIcon
Why This Matters: Client onboarding folders get messy fast
Folder setup is one of those tasks that seems small until you multiply it. A new client comes in, someone creates the main folder, another person copies last month’s structure, and then you notice “Deliverables” is missing, or “01. Documents” is named three different ways across accounts. Later, when you need a file quickly, the team wastes time searching, asking in Slack, or recreating documents because they can’t find the latest version. It’s not just annoying. It slows delivery and makes you look disorganized.
The friction compounds. Here’s where it usually breaks down.
- People copy an old client folder, which brings along outdated files and the wrong naming conventions.
- Placeholders like “Client Name Here” don’t get replaced everywhere, so your Drive becomes a landfill of half-finished structures.
- Folder creation happens in a rush right before kickoff, and that’s when missing subfolders show up.
- Even with SOPs, the structure drifts over time because the process depends on someone remembering details.
What You’ll Build: A form that clones your Drive template instantly
This workflow gives you a repeatable intake process for folders. Someone opens a simple form and types a name (a client, project, event, employee, anything). n8n creates the new “root” folder in the right Drive location, then waits briefly so Google Drive can register the folder properly. After that, n8n calls your deployed Google Apps Script web app, which duplicates your entire template folder structure into the new folder. As it copies, it replaces every {{NAME}} placeholder in folder names and file names, so the final structure is ready to share immediately.
The workflow starts with a form submission in n8n. Next, Google Drive creates the main folder and n8n pauses for a moment. Finally, an HTTP Request triggers Apps Script to perform the recursive copy, then returns the new folder URL so you can use it downstream.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Let’s say you onboard 5 new clients in a typical week. Manually, creating the root folder, 10-ish subfolders, and copying a few starter docs usually takes about 20 minutes per client, so you’re spending roughly 2 hours on pure setup. With this workflow, submitting the form takes under a minute, then Apps Script does the copying in the background (large templates can take about a minute). You get those 2 hours back, and the structure is identical every time.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Drive to create folders and store templates
- Google Apps Script to clone the template recursively
- Google OAuth2 credentials (set up in your n8n Google Drive credential)
Skill level: Intermediate. You won’t write much code, but you will deploy a provided Apps Script and paste a URL into n8n.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A form submission kicks everything off. The workflow starts when someone enters a name in the n8n form (client, project, event, and so on). That single field becomes the source of truth for naming.
Google Drive creates the new “root” folder. n8n uses the Google Drive node to create a folder in your chosen parent location, so every new client lands exactly where you want it. No more “I made it in My Drive by accident.”
A short delay prevents sync weirdness. There’s a Wait node after folder creation because Drive can take a moment to finalize a brand-new folder. Honestly, skipping this is how you end up with intermittent failures that are hard to reproduce.
Apps Script clones the whole template and replaces placeholders. n8n sends an HTTP request to your deployed Google Apps Script web app, passing the template folder ID, destination folder ID, and the submitted name. The script copies subfolders and files recursively, while replacing {{NAME}} in every file and folder name.
You can easily modify the placeholder rules to support other tokens (like {{DATE}} or {{CLIENT_CODE}}) based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
Set up the form that collects the folder name and starts the workflow.
- Add the Folder Intake Form node as your trigger.
- Set Form Title to
Create New Folder. - Set Form Description to
Enter a name to generate the folder structure. - Add a form field labeled Name with placeholder
e.g. Acme Corporationand mark it as required.
Step 2: Connect Google Drive
Create the root folder in Google Drive using the name submitted in the form.
- Add the Generate Root Directory node and connect it to Folder Intake Form.
- Credential Required: Connect your Google Drive credentials.
- Set Resource to
folder. - Set Name to
{{ $json.Name }}to use the submitted form value. - Set Drive to
My Drive. - Set Parent Folder to
DESTINATION_PARENT_FOLDER_ID.
Step 3: Set Up the Drive Sync Delay
Pause briefly to ensure Drive finishes creating the folder before template replication begins.
- Add the Delay Drive Sync node and connect it after Generate Root Directory.
- Leave default settings in Delay Drive Sync unless you need a custom wait time.
Step 4: Configure the Template Replication Request
Call your Apps Script to replicate the template folder structure into the new Drive folder.
- Add the Replicate Template Structure node and connect it after Delay Drive Sync.
- Set Method to
POST. - Set URL to
YOUR_APPS_SCRIPT_URL. - Enable Send Query.
- Add query parameter templateFolderId with value
YOUR_TEMPLATE_FOLDER_ID. - Add query parameter name with value
{{ $('Folder Intake Form').item.json.Name }}. - Add query parameter destinationFolderId with value
{{ $('Generate Root Directory').item.json.id }}.
YOUR_APPS_SCRIPT_URL or YOUR_TEMPLATE_FOLDER_ID will cause the request to fail.Step 5: Test and Activate Your Workflow
Validate the end-to-end flow and then enable it for production use.
- Click Execute Workflow and open the Folder Intake Form test URL.
- Submit a sample Name and confirm Generate Root Directory returns a new folder ID.
- Verify Replicate Template Structure returns a successful response from your Apps Script.
- Check Google Drive to ensure the new folder exists and the template structure was copied.
- Toggle the workflow to Active to begin using it in production.
Troubleshooting Tips
- Google Drive credentials can expire or need specific permissions. If things break, check the Google Drive credential in n8n and confirm the connected account has edit access to both the template and destination folders.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Google Apps Script deployments can fail if the web app access is too restricted. Confirm the deployment is set to “Execute as: Me” and “Access: Anyone,” then retest the Apps Script URL from the HTTP Request node.
Quick Answers
About 30 minutes if your template folder is ready.
No. You’ll paste provided Apps Script code and deploy it once, then connect the URL in n8n.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Apps Script and Google Drive usage, which is typically included in Google Workspace.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and that’s the fun part. You can swap the intake form field to capture more than a name, then pass extra parameters into the HTTP Request that calls Apps Script. Common tweaks include creating different templates by switching the templateFolderId, adding a second placeholder like {{PROJECT}}, or writing the returned folder URL back to Google Sheets for tracking. If you want approval before folder creation, insert a manual review step between the form and the Google Drive folder creation.
Usually it’s expired OAuth permissions or the connected Google account doesn’t have edit access to the destination or template folder. Reconnect the Google Drive credential in n8n, then confirm sharing settings on both folders. If the Drive step works but the copy doesn’t, the issue is often the Apps Script deployment URL or access level.
Practically, it can handle dozens of folder builds per day for most small teams.
Often, yes, because this workflow leans on custom logic and recursive copying. Zapier and Make can trigger folder creation, but cloning a full nested template usually turns into lots of steps, lots of maintenance, and higher task costs. n8n also gives you the option to self-host, which is handy if volume grows. If you only need “create one folder and stop,” simpler tools can be fine. If you want a reliable template clone with placeholders, n8n + Apps Script is a clean combo. Talk to an automation expert if you’re not sure which fits.
Once this is live, folder setup stops being a recurring problem and becomes a non-event. Your team gets a clean, consistent Drive structure every time, so you can focus on delivery instead of admin.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.