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

Community site session details

Session Id : 0wVejpUyjRT8NJqZCRGhyj
Power Automate - Using Flows
Answered

SharePoint When a file is created (properties only) triggers for subfolders

Like (0) ShareShare
ReportReport
Posted on 2 Jan 2024 21:53:03 by 669

I have a flow that uses the SharePoint When a file is created (properties only) trigger. Although the action allows specifying a folder after the Library is selected, the flow triggers when any subfolder beneath the specified folder has a file added. Is there any way to prevent this? I tried out the deprecated action (when a file is created in a folder), and this appears to work, but not sure why I would need to go back to an older action.

Runner55552_0-1704232359535.png

 

  • 55552 Profile Picture
    669 on 03 Jan 2024 at 13:32:56
    Re: SharePoint When a file is created (properties only) triggers for subfolders

    Thanks, this worked. I did have to make some minor adjustments in the syntax:

    In the trigger, the single quotes needed to be on the outside of the curly brackets and I needed to remove the first forward slash at the beginning of the trigger.

    @equals(triggerBody()?['{Path}'],'Documents/AP Accounting Inbox/Amazon/')

     

    Then in the folder path itself, I needed a forward slash before the path, but NO slash at the end of the path.

     

    I tested this by adding a file directly to the specified path, then added a file in the folder above and the folder below. The flow triggered properly only when I added a file to the specified path.

     

    Runner55552_0-1704288687987.png

     

  • Verified answer
    Rhiassuring Profile Picture
    8,688 Moderator on 02 Jan 2024 at 23:08:43
    Re: SharePoint When a file is created (properties only) triggers for subfolders

    Hi there, 

     

    Try adding a Trigger Condition.

     

    Rhiassuring_0-1704236835380.png

     

    So for you, you'd use @equals(triggerBody()?[{'Path'}],'/Documents/AP Accounting Inbox/')

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

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!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow
Loading complete