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 / 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

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
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 820

#3
Haque Profile Picture

Haque 505

Last 30 days Overall leaderboard