Automate robust, nested folder creation in Microsoft OneDrive using this advanced n8n workflow. It includes sequential existence checks and utilizes the n8n datastore.
Download this n8n workflow template and start using it instantly.
Creating deep, nested directory paths programmatically can be challenging, as many APIs, including OneDrive’s, require creating folders one level at a time based on the parent folder's ID. This sophisticated n8n workflow template handles this complexity by acting as a reusable sub-workflow. It accepts a single input path (e.g., Q1Projects/Marketing/CampaignA) and breaks it down for sequential processing. The core intelligence relies on using the n8n datastore to persistently track the parent folder ID across loop iterations. Before creating any folder using a Microsoft OneDrive n8n node, the automation performs a search. This existence check ensures that the n8n workflow only creates necessary folders, saving execution time and maintaining data hygiene. If you need a reliable method to manage complex folder paths automatically, this advanced n8n template is the solution.
This n8n workflow operates entirely as a sub-process, designed to be called by an external n8n trigger or node, receiving the target path string as an input variable.
Paths) splits this string (e.g., 'A/B/C') into an array of objects, calculating the full path and the required parent path for each segment.clearParent n8n node, utilizing the n8n datastore, ensures the critical parentID variable is cleared before the loop begins, preventing contamination from previous runs.Loop Over Items n8n node, ensuring each level is processed sequentially.Search) attempts to locate the folder by name.Exists n8n node checks if the folder was found and if its hierarchical parent path matches the path expected for this iteration. setParentFound n8n datastore node saves the existing folder’s ID as the parentID. The n8n workflow then proceeds to the next level of the loop.getParent n8n datastore node retrieves the ID of the parent folder (which must have been found or created in the preceding step).Create a folder) uses the retrieved parent ID to successfully create the new nested folder.setParentCreated n8n datastore node stores the newly created folder’s ID, setting the stage for the next folder creation step in the n8n workflow loop.To install this robust n8n workflow template, follow these steps:
Search and Create a folder n8n nodes and assign or create your Microsoft Drive account credentials.Client_A/Docs/Invoices) as an input variable named folder to the starting 'When Executed by Another Workflow' n8n trigger node.This n8n template utilizes several powerful n8n node types to achieve complex state management and looping:
When Executed by Another Workflow (n8n trigger):
Function: Serves as the reusable entry point for this sub-workflow, receiving the nested folder path.
Key Configuration: Configured to accept an input named folder.
Code (Paths n8n node):
Function: Transforms the single path string into an array, where each item contains the specific folder name, its full relative path, and its immediate parent's relative path, which is crucial for the sequential creation logic.
Datastore (clearParent, setParentFound, setParentCreated, getParent n8n nodes):
Function: Used for state management across loop iterations. The n8n datastore temporarily holds the ID (parentID) of the most recently processed folder, allowing the next iteration to know where to create the subsequent nested folder.
Split In Batches (Loop Over Items n8n node):
Function: Controls the flow, ensuring that the n8n workflow processes one folder segment completely (search, conditional check, creation) before moving to the next segment in the path.
Microsoft OneDrive (Search & Create a folder n8n nodes):
* Function: The primary integration node. The Search operation checks for folder existence, and the Create a folder operation generates the new directory using the parent ID provided from the datastore.
Automate meeting no-show follow-ups and rescheduling using this powerful n8n workflow. Integrate Gmail, Google Sheets, and Calendar for reliable time-based automation.

A powerful n8n workflow for scraping LinkedIn jobs, validating seniority and language with Google Gemini, calculating commute times, and scoring CV match automatically.

Use this powerful n8n workflow to automate lead scoring, email verification (Hunter.io), company data enrichment (Abstract API), and dynamic contact routing to HubSpot CRM. Download this n8n template for advanced sales operations.

Automate RSS feed monitoring using this advanced n8n workflow. It leverages an OpenAI AI Agent to intelligently filter new articles, track seen items in Baserow, and send crucial updates via real-time Slack alerts.









































