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 / When a File is Created...
Power Automate
Unanswered

When a File is Created, Create a Folder - Trigger Condition for Root Folder (Exclude Subfolders)

(0) ShareShare
ReportReport
Posted on by 4

I am working on a sharepoint library, where the initial user will need to create a folder to store several documents related to the same topic.  I created a flow for when a file is created (properties only), a subfolder is created, and the new file is moved into the newly created subfolder.  This works well, but when other related documents are later dropped in the subfolder, the workflow is triggered again, and new subfolders are created and populated with the individual files.

 

I have unsuccessfully tried a few trigger condition options so that only files dropped in the root folder trigger the creation of subfolders:

  • @endsWith(triggerOutputs()?['body/{Path}'],'Document Library/Root Folder Name')
  • @equals(triggerOutputs()?['body/{Path}'],'Document Library/Root Folder Name')

When tested, the flow is never triggered (spinning wheel never stops), the condition result is erroneously false, or most recently, without even testing, I get an error message to the effect of "cannot read properties (reading 'properties')".

 

I'm at a loss! Help, please 😕

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @1ntheRabbitH0le ,

     

    If the aim is to stop the flow from triggering if files are added to subfolders, can you not specify the Root folder name here?

    SudeepGhatakNZ_0-1669159216117.png

     

  • 1ntheRabbitH0le Profile Picture
    4 on at

    Hi, thanks for the quick reply!  Yes, that is the aim, and I did try to specify the root folder, including with an additional forward slash at the end, e.g., Root Folder/ or /Root Folder/, but it wasn't stopping the flow from triggering when a file was added to the subfolders.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard