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
Super User
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
Super User
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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (1,203)