Originally posted here: https://answers.microsoft.com/en-us/msoffice/forum/all/trouble-using-when-a-file-is-created-or-modified/4dec6483-25fc-4c0f-a400-6d7d4b2d8576
What I have done:
- Created a Flow against a Document Library in SPO using the "when a file is created or modified (properties only)" trigger
- Included in the flow, an "Update file properties" action
Here are the results:
- If I create the file and close it quickly (from the browser Excel app), the flow is successful in updating the targeted file property
- If I modify a file and close it quickly (from the browser Excel app), the flow is successful in updating the targeting file property
- If I wait too long after creating or modifying the file, the flow is unsuccessful with this error, "The file...is locked for exclusive use by..."
Obviously, this suggests that the file is "locked for exclusive use" while I have it open. This also suggests that the flow doesn't kick off immediately. If I close the file before the flow kicks off, the flow can work because it is not locked. If the file is still open, the flow can't be successful.
If my suggested conclusions are valid, WHAT IS THE POINT OF THE "When a file is created or modified (properties only)" trigger? In common workflows, a user is going to create a new file and then leave it open in the browser. The file will always be locked and actions that update file properties will NEVER WORK.