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



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


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



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Thank you, you're a star!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,071)