cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xxxxmints
Helper IV
Helper IV

Create subfolder in a folder (create new folder not working)

Hi there

Firstly I have a button flow that creates a folder and names it by 'yy/MM Surname' in a SharePoint library. It creates that folder and a few subfolders. One folder created is called 'Internal Consultation'.

 

Later, I have a flow that needs to create a subfolder in the 'Internal Consultation' folder. This is the one I'm having trouble with.

 

The flow is triggered 'for a selected file' on the (Internal Consultation) folder (to create a sub folder and send an email to someone that they need to drop docs in that folder.

 

I have tried 'Create new folder' action but it doesn't work, it says 'List not found', which is strange because when I look at the path it looks to me like it should work. 

 

Pics are flow and end result.

 

Hoping someone can help me 🙂

 

2021-12-15 15_17_20-Edit your flow _ Power Automate.png2021-12-15 15_17_31-Edit your flow _ Power Automate.png2021-12-15 15_24_37-Run History _ Power Automate.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @xxxxmints,

 

The full path also contains the library name. So, I would use an expression to remove that part of the Full Path value. And I would also move the outputs to the folder path field. 

 

Below is an example of that approach.

 

1. Change the Path of folders input the expression below:

replace(outputs('Get_file_properties')?['body/{FullPath}'], 'TestLibrary/', '')

 

replace_libraryname.png

 

2. Select the TestLibrary in the dropdown. And use the Outputs/DisplayName.

@{outputs('Path_of_folders')}/@{outputs('Get_user_profile_(V2)')?['body/displayName']}

 

folderpath_createnewfolder.png

View solution in original post

2 REPLIES 2
Expiscornovus
Dual Super User
Dual Super User

Hi @xxxxmints,

 

The full path also contains the library name. So, I would use an expression to remove that part of the Full Path value. And I would also move the outputs to the folder path field. 

 

Below is an example of that approach.

 

1. Change the Path of folders input the expression below:

replace(outputs('Get_file_properties')?['body/{FullPath}'], 'TestLibrary/', '')

 

replace_libraryname.png

 

2. Select the TestLibrary in the dropdown. And use the Outputs/DisplayName.

@{outputs('Path_of_folders')}/@{outputs('Get_user_profile_(V2)')?['body/displayName']}

 

folderpath_createnewfolder.png

Thank you, you're a star!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,446)