I am trying to create a flow where if a subfolder is created in a parent folder, automatically populate that subfolder with 5 pre made subfolders. Ex: named (1,2,3,4,5).
Parent Folder>SubFolder<Auto populate that subfolder with 5 additional subfolders named (1,2,3,4,5).
Tried to do it myself but the create folder at the end of my flow is having trouble finding the subfolder in the parent to create the subfolders.
Thanks everyone in advance. | Not needed* but if the subfolders can be uploaded in order to my liking that would be cool. 3 is first then 5 etc. I wont be using numbers for my real folders.
Solved! Go to Solution.
A solution might be to look at the Full Path and count how many text strings there are in the full path - this should tell us if the folder was created under a Parent folder.
For example, if a folder was created at the right level , we can split the Full Path "Lib1/Parent1/Sub1" at the '/' character. We will get three strings Lib1, Parent1, Sub1- and this means that the new folder was created under a Parent Folder at the correct level.
Example: Lib1 =Document Library, Parent1 = Parent Folder, Sub1= sub folder name
Full Path = "Lib1/Parent1/Sub1"
So try something like the following:
Add: ComposeSplitPath action
Update: Condition Is root Folder
Update: Create new folder path
Ellis
Please see if the following post is of any assistance:
If SharePoint Folder create than create subfolder in the created folder
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Thanks. This is close but I would like when I create a subfolder (2nd level) 5 subfolders automatically become in the subfolder. This one is for the parent folder or (1st level).
Try modifying the Create new folder action (in If SharePoint Folder create than create subfolder in the created folder ) :
Or do you mean:
Document Library = Lib3
Parent Folder = Top3
If a new folder was created under Top 3, auto-create a number of subfolders under Top3?
Lib3\Top3\new-folder\new subfolders?
Ellis
Ellis
Thanks for the response. It appears your screenshot is the original screenshot for the parent/ (1st level). I want to trigger this when a subfolder is created and route the additional 5 subfolders to the new subfolder. Parent>SubFolder<auto create 5 subfolders and route them to Subfolder. Possibly the compose function needs to change too because its path is the Parent to sub instead of sub to sub.
A solution might be to look at the Full Path and count how many text strings there are in the full path - this should tell us if the folder was created under a Parent folder.
For example, if a folder was created at the right level , we can split the Full Path "Lib1/Parent1/Sub1" at the '/' character. We will get three strings Lib1, Parent1, Sub1- and this means that the new folder was created under a Parent Folder at the correct level.
Example: Lib1 =Document Library, Parent1 = Parent Folder, Sub1= sub folder name
Full Path = "Lib1/Parent1/Sub1"
So try something like the following:
Add: ComposeSplitPath action
Update: Condition Is root Folder
Update: Create new folder path
Ellis
Good Morning Ellis,
The flow was green until create folder then it gave an error. Some additional information: The root condition folder triggers on the 47th. My folder path in create folder is
HOLY COW! IT WORKS! I was reading on my end and they say that error is when something is changed in the flow and it just bugs it out so just make a new flow of it. Tested it twice and it works! DUDE THANK YOU SO MUCH, you dont understand how hard of a time this was giving me. Mad props!
I know this is an old post but I am trying to accomplish the same thing. What are the inputs under the "compose info" and "compose subfolderpath" operations?
I still seem to have a version of that flow, looks like I didn't delete it. It may not be exactly the same version, but here it is:
Ellis
This is perfect. Thank you so much!!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
33 | |
24 | |
20 | |
16 | |
15 |