web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a subfolder ins...
Power Automate
Suggested Answer

Create a subfolder inside of a newly manually created folder.

(0) ShareShare
ReportReport
Posted on by 12
I cannot for the life of me figure out what I think should be easy. 

Here is the goal: In my SharePoint Document Library I have a list of folders: 
Inside of "Construction Projects" someone will manually create a folder. In this instance we will use "Test Folder":
 
When this happens, a flow in PA, should trigger and create a subfolder called "Estimates" inside of "Test Folder": The flow I have created is below: 

 I added "Documents" manually in List Name because it does not give me an option to choose library. I previously tried this same flow with the trigger "When a file is created (properties only)" but it gave me the same result. 


However, when I create "Test Folder" in the "Construction Project" folder, it does not create a subfolder in that specific directory. Instead it creates a folder called "Shared Documents" in the root directory which has "Construction Projects>Test Folder>Estimates". I don't know why it is creating this folder structure in the root directory and not where I have specifically mapped it to go. 

In the "Check if its going to the correct folder path" condition, I tried changing "Shared Documents" to "Documents" but it always returns false. I have also tried just doing "/Construction Projects" but that will just create a new folder in the root directory called "Construction Projects". 

Im at a loss. Any help on this would be greatly appreciated. 
 
Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
    Hi,
     
    There is small correction to be added in the Create folder action as shown below
     
    Expression: replace(triggerOutputs()?['body/{FullPath}'],'Shared Documents/','')
     
    Removing Shared Documents sentence from folder path helps to create the folder in desired path. 
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • CalleyMinuz Profile Picture
    12 on at
    I am trying to add an additional function and create a spreadsheet dynamically the same way I am creating the folder dynamically with the name. But I am having a similar issue. Here is my current flow: 

     
     


    The folder path I simply copied from the solution you gave me and put it on the create job schedule spreadsheet function, but it does not create it. It errors out and says it cant find the root folder. When I tried adding the dynamic content "Full Path" it creates the spreadsheet in the proper place but it also creates it in every single folder created in the Root folder which is not correct and im not sure why it would do that. 
     
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
    Hi
     
    While creating file/spreadsheet in destination folder- make sure use the following dynamic content from Create folder action (which has been used to create the Estimates folder)
     
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • CalleyMinuz Profile Picture
    12 on at
    I think you misunderstood as this does not work. When I setup what you suggested it does the following: 



    The "test Job Schedule.xlsx" is correct. But it goes on a never ending loop and keeps creating folders and spreadsheets: 



    It keeps creating folders and renames the folders and spreadsheets. It keeps going and the slows the entire site up and the only way to stop it is to delete the original folder. So adding "Folder Path" and then "Name" does not work, it in fact breaks everything. 
     
     
  • CalleyMinuz Profile Picture
    12 on at
    It created over 50 folders and spreadsheets before I stopped it in under 30 seconds with making the edit you suggested.
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
    Hi ,
     
    I tried something simmilar to create .txt files under the folder.
     
     
     
     
    It worked for me 
     
    Also if you want to limit trigger creation around construction folder - you can limit in trigger as shown below
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • CalleyMinuz Profile Picture
    12 on at
    In your example, you are putting data.txt inside of the Estimates folder. That is not what I am trying to do. The data.txt folder should go in the manually created folder. The manually created folder should have :
    1. Estimates folder (nothing inside of it)
    2. data.txt

     
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
    Hi,
     
    In you create file action try the following modifications as shown below in folder path:
     
     
     
     
     
    Expression: 
    substring(outputs('Create_new_folder')?['body/{Path}'],0,sub(length(outputs('Create_new_folder')?['body/{Path}']),1))
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard