I have a Flow that triggers on 'When a file is created'. The goal of the Flow is to assign a property to the document. The file is created from the New menu in SPO.
The problem with this action is the file will be locked, of course, when the user creates the file. The file automatically opens in the browser (usually) thus is locked for editing.
Besides using a random retry interval on the trigger, is there any other solution available? I won't know when the document is unlocked as that would be an indeterminiate amount of time, based on user interaction with that document.
Please see my screen shot below and give it a try. I create a loop and run until a boolean variable equals true. I am using the run after configuration in the set variable actions to handle the error - this should allow the Flow to proceed until it is successful.
Please note that I haven't tested this (short on time right now...) but I believe it will work for you.
Hi @trevorseward ,
This is related to the file you created the new file. If you upload a file, this problem will not occur.
Since Word online has an AutoSave mechanism, when you create a new file, even if you don't click Save button, the file will automatically save and trigger Flow.
At the same time, in order to avoid content confusion when editing files, the file will be locked, so other actions in Flow may not be able to operate on it.
You could try adding a Delay action in the Flow, waiting for the file to be edited and automatically unlocked to execute the remaining actions.
Besides, please check this similar thread and see if it helps:
https://powerusers.microsoft.com/t5/Flow-Ideas/SharePoint-Wait-for-file-to-be-unlocked/idi-p/180922
Best Regards,
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional