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 / SharePoint When a file...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on by 676

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

 

Categories:
I have the same question (0)
  • Verified answer
    Rhiassuring Profile Picture
    8,692 Moderator on at

    Hi there, 

     

    Try adding a Trigger Condition.

     

    Rhiassuring_0-1704236835380.png

     

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

  • 55552 Profile Picture
    676 on at

    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

     

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
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard