Basically I have a lot of units in a project I am working on and want to create a SharePoint folder for each one named after each project. The Path argument of "create new SharePoint folder" doesn't seem to recognize variables as dynamic arguments so I've tried passing the data in through a .json file and the compose action but my flow keeps getting stuck in the apply to each function at the end.
Running the program without the create folder action shows that the values I want to use to name the folders as are coming out of Compose 3 just fine. So it's something with the create folder hanging everything up.
Is it possible to pass in a variable as the the Path argument when creating a new SharePoint folder? Or is there a reason I'm missing as to why the apply to each is getting stuck?
Hi @jsbmk ,
I have replicated the issue you mentioned and here are the steps and details of what worked for me:
I hope this information is helpful. If it is, please consider giving a thumbs up.
Best regards,
Venkadesh Sundaramurthy
What you are generating cannot be used as a folder path. It contains invalid characters and line returns that are not allowed. A folder path would be something like.
/documents/expenses/reports
Oops. Here's what I have currently:
Since you don't show what you are actually composing in the Compose actions, it is hard to tell what the problem may be. However, this has worked for me without any issues:
In the Create file action, select the root level folder where you want the subfolders created. Then be sure that your variable data path begins with a backslash as shown above in the Compose Folder Name action. Don't confuse it with the Compose Folder Path action. That one creates the link to the folder that I use in an e-mail action later on.
My naming convention is the current year and the ID of a forms submission padded with zeros. It results in folders named like:
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2