UPDATE: Since writing this blog, Microsoft have rebranded Flow as PowerAutomate.
Creating a Flow from a SharePoint Online document library reveals a template “request managers approval for selected file” Flow. Once configured, a Flow becomes available form the Flow menu that send starts and approval process, however it is missing one key feature. It doesn’t actually approve a draft item and publish it.
SharePoint document libraries have a feature for authoring draft documents and then publishing. Draft versions of document are only visible to the editor(s) and approvers, while users with read access only see the last published major version. For example, version 1.0 is a major version visible to all users, updating the file creates version 1.1, 1.2 etc that are visible to the editors only, once published the most recent minor version becomes version 2.0 and is visible to read only users.
Document publishing is a great feature for controlled documents, contract management systems, policies etc. It is a core feature of all supported versions of SharePoint.
This video shows how to modify the out of the box Flow adding SharePoint document publishing.
Things to be aware of:
- Users must have edit rights to the file to run the Flow
- This example doesn’t check the status of the item and only works if the document is draft. You could add a condition to check for this if needed.
Any one who will act as an ‘Approver’ will need to approve the item. The SharePoint permissions ‘Design’ and ‘Full Control’ give this level of access or ‘Owner’ if you are using Office 365 Groups. A user who is an Office Group Member (Edit permission) cannot approve an item but can submit an approval.
This Flow could be extended further to generate PDF versions of a Word document or copy the approved file to a different location.
Don’t forget to Share the Flow with users who can request approval!
You may also be interested in this blog I wrote on getting signatures with SharePoint and Word.
Please subscribe to my YouTube channel for more demos.