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 / Flow For Parent Folder...
Power Automate
Unanswered

Flow For Parent Folder Only When New Item Is Created

(0) ShareShare
ReportReport
Posted on by

Hi! I have clients that upload electronic work orders to various SharePoint sites. The electronic work order contains three folders - one parent (main) folder and two child (sub) folders. There are numerous files contained within the two subfolders. I'm trying to create a flow that automatically populates only one entry from the parent folder file name path to an Excel table. Reason being, I don't want duplicate name entries in the table for the two subfolders or for files within those folders. I just need one entry in the table for the parent folder. I used "Create an Item" and set a trigger to populate an entry in a table only when a folder is created. However, I get three entries in the Excel table when running the flow - one for the main folder and two for the subfolders. What can I do to get an output which only populates the main folder name in to the table?

 

Example client work order uploaded to SharePoint:

(1) Parent Folder "A"

     (2) Subfolder "B"

             (a) File "X1"

     (3) Subfolder "C"

            (b) File "X2"

 

I'm trying to create a flow that populates the name/file path of only 'Parent Folder "A"' to an Excel workbook each time a client uploads a work order folder to SharePoint.

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Guardian1 

     

    Are you trying to get a substring?  http://sharepointsite.com/shareddocs/parentfolderA/subfolderb/filex1

    as  http://sharepointsite.com/shareddocs/parentfolderA

     

    There is the substring expression which could be combined with indexof to find the first / after the main site URL.  

     

    DamoBird365_0-1617523968235.png

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

     

     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard