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 😕