# Create Folder

Creates a folder in any connected storage library from a flow.

> Kind: Flow action · Updated: May 6, 2026

## What this action does

Creates a folder at a destination in your connected storage. Use it for automated folder structures — e.g. a folder per Opportunity on creation. Available in record-triggered, scheduled and screen flows. The async variant Create Folder (Async) returns immediately and emits a ⚡ Folder Created event when done.

### Creating folders — choose your approach
- **From the widget** (No code) — One-off folders while working a record. Nothing to configure.
- **Create Folder flow action** (Recommended) — Automated structures — a folder per record, triggered by CRM events. This page.
- **Apex / REST API** (Developers) — Custom logic, bulk migrations, calls from external systems.

### Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Folder Name | String | required | Name of the folder to create. Merge fields supported — e.g. {!$Record.Name}. Illegal characters for the target storage are auto-replaced. |
| Conflict Behavior | Picklist | optional | What to do if a folder with this name exists: fail · rename · useExisting (default). |

### Destination parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Library | String | varies by storage | Which connected storage to create the folder in. |
| Drive ID | String | varies by storage | The drive/document library within the storage. |
| Parent Folder ID | String | varies by storage | Folder under which the new folder is created. |

> **Where do these IDs come from?** — Use the Get Connected Folder action to resolve a record’s folder and drive, or copy IDs from the storage library page in CloudFiles Settings. The library configuration pages explain each provider’s ID model.

### Output parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Resource ID | String | optional | CloudFiles ID of the created folder. Store it on the record to skip lookups later. |
| Resource Path | String | optional | Human-readable path, e.g. /Accounts/Acme Corp/Contracts. |
| Type | String | optional | Always folder for this action. |

## Conflict behavior

> **Folder already exists** — useExisting makes the action idempotent — re-runs return the existing folder instead of failing. Prefer it in record-triggered flows, which can fire twice.

```apex
// Same operation via Apex — see Developer reference
List<Types.CreateFolderInput> inputs = new List<Types.CreateFolderInput>();
inputs.add(new Types.CreateFolderInput('Contracts', parentId));
List<Resource> out = Client.createFolders(inputs, 'sharepoint_a8x2', null);
```
