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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need to automatically ...
Power Automate
Unanswered

Need to automatically create sub-folders in Sharepoint when a new folder is created

(0) ShareShare
ReportReport
Posted on by 11

I found a couple of topics on this, but none are quite right for what I'm trying to do. Basically I have a folder structure that looks similar to Documents\<user created folder>\subfolder1\subfolders2-5 and then repeat for 10 total subfolders, each with 3-5 subfolders underneath them. I need this to trigger when that user created folder is created and only on that level, then the sub-folder should all be created underneath.

 

 

The issue I'm running into is I can't figure out two things:
1) How to make this trigger ONLY when a user creates a folder at that top level, not within a sub-folder

2) How I can reference that user created folder for creating the subfolder structure.

 

So far the only thing I've written is the basic condition to identify if a folder was created:

MattConnex_0-1694709042740.png

 

 

Any assistance with this would be greatly appreciated.

Categories:
I have the same question (0)
  • Verified answer
    MattConnex Profile Picture
    11 on at

    Actually, I think I have this one, I missed this post when I was searching:
    https://powerusers.microsoft.com/t5/Building-Flows/If-SharePoint-Folder-create-than-create-subfolder-in-the-created/td-p/1404087

     

    This seems to get me a good chunk of the way there. I can create the initial sub-folders now and it only triggers when a folder is created at the top level. However, I'm having trouble getting the folders deeper down the tree created. So I have for example:

    /Test

    //Test1

    //Test2

    //Test3

     

    But, I also need:

    /Test

    //Test1

    ///Test1-sub

    ///Test2-sub 

  • MattConnex Profile Picture
    11 on at

    Nevermind, I've got this. In case anyone else runs into this when you create the array you can build out multiple layers of sub-folders in the array with /

     

    So:

    "Test"

    "Test/Sub Test"
    "Test/Sub Test/Second sub"

     

    And it will do what you need.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard