Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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.

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at
    Re: Flow For Parent Folder Only When New Item Is Created

    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1