Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

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

(0) ShareShare
ReportReport
Posted on by 667

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
    667 on at
    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 Super User 2025 Season 1 on at
    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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow