Create Folder
📘 Definition
The "Create Folder" action in the OneDrive category allows you to programmatically create a new folder within your OneDrive account as part of your automated workflow. You can define the folder’s name, choose its parent directory (either the root or a subfolder), and control what happens if a folder with the same name already exists using flexible conflict resolution options.
This action is especially useful when organizing files by dynamically creating structured folders (e.g., per client, project, or submission). It supports both static and dynamic folder paths or IDs and integrates seamlessly with other file handling steps in your flow.
Key capabilities include:
- Create folders in any location within OneDrive
- Avoid conflicts by renaming, replacing, or failing based on your choice
- Easily use dynamic folder names and locations using tokens from earlier steps in the flow
Example Use Cases
1. Organizing Client Submissions
Automatically create a new folder for each client submission using their name or ID to store related documents uploaded via a Zenphi form.
2. Monthly Reporting Structure
At the beginning of each month, create a dedicated folder (e.g., "Reports - July 2025") to store all generated reports or spreadsheets, keeping your OneDrive organized and up to date.
3. Upload Prep Folders
Before uploading files via an automation, create a specific folder dynamically (e.g., based on ticket number or form input) to hold that data, ensuring everything is grouped correctly.
4. Reorganize Legacy Files
As part of a cleanup or reorganization flow, use this action to automatically create categorized folders (by year, department, etc.) and move existing files into them using follow-up steps.
Inputs
📡 Connection
The OneDrive connection that authenticates and authorizes access to the target account.
How to Use: Select or create a connection to your OneDrive account. This connection ensures the action can interact with the right storage environment where the folder will be created.
📂 Folder Name
The name you wish to assign to the new folder.
How to Use: Enter the desired name for your folder. This can be a static value (e.g., "Invoices 2025") or dynamically generated using tokens (e.g., form field values, timestamps) to create context-based folder names.
🗂️ Parent Folder Id
Specifies the location where the new folder will be created.
How to Use: You can define the parent folder in one of two ways:
-
Via UI Picker: Click the OneDrive icon in the field to visually select a folder from your account.
-
Manual Input:
- By ID: Provide a unique OneDrive folder ID (e.g.,
1EED600A8F0FD9A1!...
) - By Path: Enable the “Select By Path” toggle and input a folder path (e.g.,
/drive/root:/Documents/2025
).
- By ID: Provide a unique OneDrive folder ID (e.g.,
🔄 Conflict Behavior
Determines what happens if a folder with the same name already exists in the specified location.Options & Use Cases:
- Rename: Automatically renames the new folder by appending a suffix (e.g., "MyFolder (1)") to avoid conflict.Ideal when you want to preserve all previous versions or create multiple folders with similar naming.
- Replace (default): Overwrites the existing folder and its contents with the new one.Use when you want to reset the contents each time with fresh data.
- Fail: The flow throws an error if a naming conflict is detected.Use when you want to enforce unique folder names and halt the flow if duplication occurs.
📤 Outputs
🆔 Folder Id
The unique identifier assigned to the newly created folder in OneDrive.
Purpose & Use: This ID can be used in subsequent actions (such as uploading files to this folder, retrieving folder info, or moving contents). Since OneDrive references folders by internal IDs, this is critical for automation where dynamic folder referencing is needed.
Useful for linking or chaining flows when you need to access or update this folder later.
📁 Folder Path
The full OneDrive path to the newly created folder, showing where it resides within the file hierarchy (e.g., /drive/root:/Documents/Reports/Q2
).
Purpose & Use: This path helps visually confirm the location of the folder in OneDrive and can be used to display or log folder locations in emails, approvals, or audit trails.
Ideal for human-readable references, documentation, or when paths are needed over IDs.
📌 Example Scenario
Use Case: Automatically Organizing Uploaded Form Responses
Scenario: Imagine you're running an onboarding process where new employees fill out a Zenphi Form that collects their personal details and documents (e.g., resume, ID scan, contracts). You want to automatically create a dedicated OneDrive folder for each new employee where all related files will be stored.
How to Set It Up:
-
Trigger: Start the flow using a Zenphi Form submission that collects employee details.
-
Action – Create Folder:
- Connection: Use your authenticated OneDrive connection.
- Folder Name: Use a dynamic token from the form input such as
{{Form.EmployeeFullName}}
to personalize each folder. - Parent Folder ID: Select a fixed parent folder like
/drive/root:/HR/Onboarding
either by using the folder picker or setting the path manually. - Conflict Behavior: Set to
"Rename"
to avoid errors if a folder with the same name already exists.
-
Result: A folder like
John Smith
will be created under/HR/Onboarding
. -
Next Steps: Use the newly created folder ID to upload the employee's files into the correct location using further actions like "Upload File".
Benefits:
- Keeps OneDrive organized.
- Reduces manual effort.
- Prevents file overwrites or naming conflicts.
- Supports scale and automation in HR or any form-driven processes.
Updated 26 days ago