I'm a relatively new Power Automate user. We have an approval flow configured in a library but keep running into issues where a user in the approval process (e.g. the flow initiator, the person cc'd, or the approver) will have the document open and the flow fails.
We worked with our sharepoint vendor to build in an error notification when the document is open by building in an action where the flow checks the file properties, sees if it is locked, and then if it is, sends a notification email. Unfortunately, there seems to be no way to mine the name of the specific person who has the document open and send them an email asking them to close it so the flow can complete.
Is there a way to do this that I am missing? Or is it functionality that we're hoping can be added in the future? I can include screenshots if that would be helpful.
I suppose one way could be to email the initiator, cc and approver with a message to asking them to exit the file. It casts a wide net but will hopefully get the culprit to close the doc.
Another method could be to force the document library to checkout documents so only the person editing the doc has exclusive access and can be tracked. This would then allow you to use the SharePoint connector > Get file properties and Checked out to DisplayName to see who is editing the doc and to specifically send them a message.
You can change the checkout settings at the bottom of the Versioning Settings.