If you’ve tried to create a folder in SharePoint from Power Apps, you’ve probably searched for a folder function and found nothing. Patch adds list items, not folders, so the button seems to have no way to do it.
The fix is a small Power Automate flow. The app sends the path, the SharePoint Create new folder action builds it, and the flow sends the full path back to the app.
In this tutorial, we’ll create a folder in SharePoint from Power Apps step by step. You’ll build the Power Apps (V2) flow, call it from a button, make nested folders in one call, and see what really happens when the folder already exists.
The Sample App and Library We’ll Use
Everything below runs in my real tenant, inside the Service Desk Demo canvas app I use for every Power Apps tutorial on this site. Here’s the setup:
- Library: the default Documents library on the SPGuides Team Site (/sites/SPGuides).
- Flow: SPGuides Create Project Folder, an instant flow with the Power Apps (V2) trigger.
- Screen: scrFolder with a text input (txtFolderName), a button (btnCreateFolder) and a label for the result.
- Test path:
Client Projects/Wilson Dental. Neither folder existed before the first run.
That path is the tricky part on purpose. It has a parent folder that doesn’t exist yet and a space in both names, which is exactly what real project folders look like.
Build the Demo App Step by Step
New to canvas apps? Here’s how to get a blank screen ready. If you already have an app, skip to the next section. For a manual folder without any app, see how to create a folder in SharePoint from the library itself.
1. Go to make.powerapps.com, stay on Home, and select Start with design.

2. On the Create an app page, pick Create from blank (a canvas app, which means you place every control yourself).

3. In Start with a blank canvas, choose Tablet. Power Apps Studio, the app editor, opens with an empty screen.

4. Open Insert and add a Text input and a Button. Rename them txtFolderName and btnCreateFolder in the Tree view, so your formulas read clearly.

5. Select the text input, pick Default in the property dropdown (the box left of the fx formula bar) and type "Client Projects/Wilson Dental". Our guide to the modern text input control covers its other properties.
6. Add a Text label under the button. You’ll point it at the returned path later. Press Ctrl+S now and then to save the app.
Method 1: Build a Power Apps (V2) Flow With Create New Folder (Recommended)
This is the method I use on client projects. It needs no premium connector, works for nested paths, and hands the real folder path back to the app.
Same sample as before: the flow will receive Client Projects/Wilson Dental and create it in Documents.
Step 1: Create the instant flow. In Power Automate, go to Create > Instant cloud flow. Name it SPGuides Create Project Folder, pick When Power Apps calls a flow (V2) and select Create.

Step 2: Add the input. Select the trigger, then + Add an input > Text. Name it FolderName and give it a description such as “Folder path to create, e.g. Client Projects/Wilson Dental”.

The input types you can pick are Text, Yes/No, File, Email, Number and Date. Inside the flow, the first text input shows up in expressions as triggerBody()?['text'], which is the token the old V1 trigger tutorials talk about.
Step 3: Add Create new folder. Select + under the trigger, then Add an action, and search for Create new folder. Pick it from the SharePoint group.

Fill in its three required fields:
- Site Address: pick your site, or choose Enter custom value and paste its URL.
- List or Library: Documents (use the display name here).
- Folder Path: insert the FolderName token with the lightning (dynamic content) button, or type / in the box.

Step 4: Send the path back. Add another action and search Power Apps. Searching “Respond to a PowerApp” didn’t show it for me; the Power Apps connector lists it as Respond to a Power App or flow.
Add a Text output named folderpath and set it to the Full Path token from Create new folder. In the box it appears as body/{FullPath}. Then select Save.

How does this work?
The V2 trigger is the doorway: whatever text the app sends lands in FolderName. Create new folder reads that value as a path, so every slash becomes one more folder level.
Respond to a Power App or flow is what lets the app wait for an answer. Without it, the app can start the flow but gets nothing back. If you later need the path inside other flows, see how to get the document library folder path in Power Automate.
Call the Flow From the Power Apps Button
Back in Studio, on the scrFolder screen with txtFolderName still holding Client Projects/Wilson Dental.
Open the … on the left rail, then Power Automate > + Add flow. Search SPGuides and pick SPGuides Create Project Folder.

It shows under In your app as SPGuidesCreateProjectFolder. Studio removes the spaces from the name, so that’s the name your formula uses.
Now select btnCreateFolder, pick OnSelect in the property dropdown, and paste this formula:
Set(
varFolderPath,
SPGuidesCreateProjectFolder.Run(txtFolderName.Text).folderpath
);
Notify("Folder created: " & varFolderPath, NotificationType.Success)

Set the label’s Text property to show the returned path:
"Flow returned: " & varFolderPath
To test, select the Play button at the top right (or hold Alt and click the button in the editor). My run showed the banner and this label: Flow returned: Shared Documents/Client Projects/Wilson Dental.

The flow answered in under a second (the run history showed an average of 608 ms). In SharePoint, Documents now has Client Projects, and inside it sits Wilson Dental.

How does this work?
Run(txtFolderName.Text) sends the box’s text to the FolderName input. The app waits, and .folderpath reads the output you named in the Respond action. Power Apps uses the output name you typed in the flow, so folderpath stays lowercase here.
Set stores that path in varFolderPath, a global variable you can use on any screen. Our post on global vs context variables explains the difference, and the Power Apps Notify function guide covers the banner types.
Pro Tip: Edited the flow in Power Automate instead of Studio? Open the flow’s … in the Power Automate pane and select Refresh. Microsoft warns the app may fail to run the flow until you do.
Create Nested Folders and Return the Path to the App
You don’t need one action per level. With Client Projects/Wilson Dental, a single Create new folder call made the missing parent and the subfolder together. That matches Learn’s own description: “Creates a new folder or folder path.”
Two details in the returned path are worth knowing:
- It starts with Shared Documents, the library’s URL name, not the display name Documents. Use it as-is when you build links.
- It has no leading slash and no site URL. Put your site URL in front to make a full web address.
For a full project structure (Contracts, Invoices, Photos under each client), add one Create new folder per subfolder in the same flow. Each one takes a path like the FolderName token followed by /Contracts. Our SharePoint folder structure best practices guide helps decide how deep to go.
Block empty paths before the flow runs. This version trims spaces and warns instead of calling the flow:
If(
IsBlank(Trim(txtFolderName.Text)),
Notify("Type a folder path first", NotificationType.Warning),
Set(
varFolderPath,
SPGuidesCreateProjectFolder.Run(Trim(txtFolderName.Text)).folderpath
);
Notify("Folder created: " & varFolderPath, NotificationType.Success)
)
What Happens When the Folder Already Exists?
This is what most people search for, so I tested it. I ran the same app again with the same path, Client Projects/Wilson Dental.
The flow succeeded again and returned the same path. There was no error, and SharePoint still had only one Wilson Dental folder under Client Projects. It didn’t make a “Wilson Dental 1” copy either.
So in my tenant, running Create new folder on an existing path was safe. Still, if your flow does more after it (a copy folder step, a welcome file, a sharing link), you may want to know whether the folder was new.
Here’s a pattern built only from documented pieces:
- Add Get folder metadata using path before Create new folder, with the same path. Microsoft describes it as getting information about a folder picked by its path.
- Open the next action’s Settings and use Run after so it runs when the metadata step has failed, meaning the folder wasn’t found.
- Return a second text output, such as status, with “created” or “existed”, and show a different Notify message in the app.
For bigger flows, put the steps in Try and Catch scopes, as shown in our guide to try catch error handling in Power Automate.
Important: by default an action runs only when the one before it succeeds. If Respond to a Power App or flow sits after a failed action, the app never gets its answer. Make sure the Respond step also runs on the failure path, or the button just reports a flow error.
Method 2: Create the Folder With Send an HTTP Request to SharePoint
Use this when you want the raw SharePoint REST call, for example to control the exact server-relative URL. For most apps, Method 1 is simpler.
Same trigger and same FolderName input. Replace Create new folder with Send an HTTP request to SharePoint and set:
- Site Address: the SPGuides site.
- Method: POST.
- Uri:
_api/web/folders - Headers and Body: the JSON below.
Here are the headers:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
}
And here’s the body, following the folder example in Microsoft’s SharePoint REST reference:
{
"__metadata": { "type": "SP.Folder" },
"ServerRelativeUrl": "/sites/SPGuides/Shared Documents/Client Projects/@{triggerBody()?['text']}"
}
How does this work?
POST to _api/web/folders creates a folder at the ServerRelativeUrl you send. That URL includes the site path and the library’s URL name, Shared Documents, which is why Method 1 returned that same name.
Respond with any text you like, then call it from the app with the same Run formula. Our SharePoint REST API CRUD operations guide has more calls for folders and items, and creating a SharePoint site from Power Apps uses the same app-to-REST pattern.
Note: Microsoft says these REST examples don’t support the % and # characters. Keep those out of folder names here, and handle the existing-folder case yourself.
Folder Naming Rules and Permissions
SharePoint rejects some names no matter which method you use. Validate these in the app before calling the flow:
- No
" * : < > ? \ |characters. A/isn’t part of a name; it splits the path into folders. - Some tenants also block
#and%. - No leading or trailing spaces, which is why the guard formula uses Trim.
- Reserved names: .lock, CON, PRN, AUX, NUL, COM0-COM9, LPT0-LPT9, desktop.ini, names starting with ~$, and anything containing _vti_. “forms” can’t be a folder at the library root.
Permissions come from the flow’s SharePoint connection. The account behind it needs rights to add items to the library, such as the Edit or Contribute permission level. If you switch the V2 trigger to the user’s own connection, refresh or re-add the flow in the app, as noted in our fix for InvokerConnectionOverrideFailed in Power Apps.
One more from Microsoft: values passed from Power Apps to a flow are visible in network traffic. If the path decides where sensitive files go, check it inside the flow too.
Which Method Should You Use?
| Situation | Use |
|---|---|
| Most apps: create a folder or a nested path from a button | Method 1: Create new folder |
| You need the folder path back in the app | Method 1 + Respond with Full Path |
| You want to know if the folder already existed | Method 1 + Get folder metadata using path and Run after |
| You need the exact REST call or a custom server-relative URL | Method 2: Send an HTTP request to SharePoint |
I’d pick Method 1 nine times out of ten. If you also want to move files into the new folder, our guide on how to retrieve SharePoint data in Power Apps using Power Automate uses the same flow-and-respond setup.
Things to Keep in Mind
- Flow not in the Add a flow list: it needs a Power Apps trigger and you need access to it. Save the flow first.
- .folderpath is not recognized: the output name in the formula must match the Respond output exactly. Refresh the flow in Studio after renaming it.
- Library name in the path: you already pick the library in List or Library, so Folder Path starts below it:
Client Projects/Wilson Dental, not Documents/Client Projects/Wilson Dental. - Links break: the returned path uses Shared Documents, the library’s URL name, not the display name.
- Blank or bad names: trim the text and check it with IsBlank before Run, and keep the invalid characters out.
If you build apps like this at work, our Power Apps training course covers flows, variables and SharePoint step by step.
Working with SharePoint files from your apps? These go well with this one:
Frequently Asked Questions
Can Power Apps create a SharePoint folder without Power Automate?
Not with a built-in function. Patch adds list items, so the usual way is a flow with the Power Apps (V2) trigger and the SharePoint Create new folder action, called from a button with Run.
Does Create new folder fail if the folder already exists?
In my test, no. Running it twice with Client Projects/Wilson Dental succeeded both times and SharePoint kept just one folder. Use Get folder metadata using path with Run after if you need to know whether it was new.
How do I return the folder path from the flow to Power Apps?
Add Respond to a Power App or flow, create a Text output such as folderpath, and set it to Create new folder’s Full Path. In the app, read it with YourFlow.Run(txtFolderName.Text).folderpath.
How do I create a subfolder or nested folders from Power Apps?
Send a path with slashes, like Client Projects/Wilson Dental. Create new folder builds every missing level in one call, as the SharePoint connector reference describes it: a new folder or folder path.
Which characters can’t I use in a SharePoint folder name?
Leave out ” * : < > ? / \ | plus leading or trailing spaces, and avoid # and % if your tenant blocks them. Microsoft lists every rule in restrictions and limitations in OneDrive and SharePoint.

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.