A specialized n8n workflow designed to recursively create nested Google Drive folders from a defined path string, optimizing file organization and providing the final folder ID for subsequent file uploads. Get this n8n template now.
Download this n8n workflow template and start using it instantly.
Users needing to programmatically enforce deep, standardized folder structures in Google Drive.
System administrators or developers who integrate folder creation into automated data archival or project setup processes.
Anyone looking for a reusable n8n node component for robust Google Drive operations.
Organizations utilizing n8n templates for efficient cloud storage management.
Managing complex, deeply nested folder structures in Google Drive can be cumbersome when automated processes require specific, multi-level directory trees. This specialized n8n workflow solves this by taking a single path string (e.g., Projects/2024/Q4/Client_Data) and intelligently ensuring that every folder in that hierarchy exists. This particular n8n workflow is designed to be called by an Execute Workflow Trigger from another flow, acting as a powerful subroutine. It checks for the existence of each component folder and only creates it if necessary, dramatically streamlining file management and ensuring that subsequent tasks in your parent n8n flow can immediately access the correct final folder ID for operations like file uploads.
This powerful n8n workflow is intended to be called by an Execute Workflow Trigger from a parent process. The primary input requires the starting googledrivefolderid (e.g., 'root') and the desiredpath string.
Split the desired path) takes the input path string (like A/B/C) and splits it into an array ([A, B, C]).Check if top folder exists) queries the current parent folder to see if the folder corresponding to the first element of the array (e.g., 'A') already exists.If top folder doesn't exist) checks the search result. If the folder is not found, the Create new subfolder Google Drive n8n node creates it. If found, the creation step is skipped.Set parameters for next run) performs two crucial tasks: it updates the parent ID to the ID of the newly created or found folder, and it removes the processed folder name from the array using JavaScript's shift() method.If path has been completely created) checks if the path array is empty. If it is not empty, the flow loops back to process the next folder in the path (e.g., 'B').To deploy this reusable n8n template:
Check if top folder exists and Create new subfolder) with your authenticated Google Drive account.Execute Workflow Trigger, meaning you must save this workflow and then call it from another parent n8n workflow for production use.Manual Trigger and Dummy input data Set n8n node to test the logic with sample path strings (remember to disable the Execute Workflow Trigger when using the Manual Trigger). Ensure your Google Drive account has the necessary permissions to create folders in the specified root or parent folder ID.This n8n workflow utilizes several key nodes to manage the recursive folder creation:
Execute Workflow Trigger: The essential n8n trigger for running this workflow as a sub-process, allowing other parent n8n workflows to call it with required inputs (googledrivefolderid and desiredpath).
Set (Dummy input data): An n8n node used purely for providing test inputs when testing manually. Sets the start ID (e.g., 'root') and the path string (e.g., 'testXavier/2024/Q4').
Code (Split the desired path): This Code n8n node splits the input path string by the / delimiter into a manageable array of folder names.
Google Drive (Check if top folder exists): A critical Google Drive n8n node configured to search for a folder name (the first item in the path array) within the current parent folder ID.
If (If top folder doesn't exist): This conditional n8n node directs the flow, proceeding to creation only if the query from the previous Google Drive n8n node returns an empty result.
Google Drive (Create new subfolder): The core creation n8n node. It creates the folder using the current parent ID.
Code (Set parameters for next run): This Code n8n node handles the recursive logic, setting the newly created folder ID as the new parent ID and removing the first item from the remaining path array to prepare for the next loop iteration. This makes the n8n workflow highly flexible.
If (If path has been completely created): Checks if the path array is empty to determine if the recursion should stop or continue looping back to the path creation step.
Use this n8n workflow to automatically create Google Calendar events from labeled Gmail emails. Leverages Gemini AI to parse event details, saving time on scheduling.

Automate scheduling! Use this powerful n8n workflow to instantly create Google Calendar meetings with video links whenever a Trello card is moved to a specific list. Leverage n8n templates for efficiency.

Instantly schedule Google Calendar events using natural language chat inputs powered by GPT-4o-mini. Download this robust n8n template for conversational scheduling automation.

Generate 50+ unique, high-quality UGC images for your products instantly. This powerful n8n workflow uses Mistral and Fal.ai, triggered by a Google Drive upload, offering highly efficient visual asset creation.

Use this powerful n8n workflow to automate podcast note-taking. Transcribe audio sent via Telegram, summarize it using an OpenAI n8n node, and generate structured outlines directly saved to Notion.

Use this powerful n8n workflow to automatically transcribe audio from Telegram, summarize the content using OpenAI, generate structured notes, and save them directly to Notion. Efficient n8n templates for AI content processing.









































