Forum Discussion
Microsoft Flow and document lifecycle for approving major versions
Jeremy Thake Christian Glessner
I got it working the other day and thanks for the comments.
Upon Item selected trigger, I set content approval status to submit.
After approval action, I set content approval status to 'approve', but the trick is to click on 'advanced' and you will see a field to enter ETag. So add the ETag that is the output of the first content approval status action.
Therefore, document becomes approved in the doc library.
There should be a new trigger when from the Doc Library, when a user submits a doc for content approval. Thank you again.
My situation is a little different. I am not looking at Content Approval. I simply want to publish a major version of my document. i.e. v1.0
- Richard BurdesApr 08, 2018Brass Contributor
Similar to Mark's question / situation.
I can do an approval based on the assumption the file is new or someone has edited it in the library so the approval status is reset to Pending.
But what about situations where the doc owner gives the file a surface review, makes no changes and simply wants to re-approve / reset the document review date. It would be great if I could wrap these teo scenarios into the same flow with a check against current approval status. But it looks like I'm going to have to build 2 flows for each, and work off another column, or automatically update a metadata column to force a Pending state then send for re-Approval.
Is my take on this still accurate? Still cannot look up the selected files approval state via a condition?
Cheers
- Richard BurdesApr 08, 2018Brass Contributor
To update myself.... looking at a REST call on item get _ModerationStatus and see if I can check the current status via REST then apply this to a condition. So if current status = Approved = reapprove, else regular approval flow.
- Richard BurdesApr 09, 2018Brass Contributor
To assist anyone - using the SP api of GetByTitle combined with the method of calling your tenant/site/library with a client secret etc allows you to send a GET of
https://yoursite.sharepoint.com/sites/Sitename/_api/lists/GetByTitle('MyWorkFlowLibrary')/items('docID')/OData__ModerationStatus
You can then assess the current status of the object approval with the following -
Approved, //0 Denied, //1 Pending, //2 Draft, //3 Scheduled //4
run a condition against that and then keep a basic 're-approval' in the same flow as a full on new doc approval.
Hope this helps..