cancel
Showing results for 
Search instead for 
Did you mean: 

Sharepoint - Get content approval status

When a set content approval status to Pending by using the submit action, I get this error when the file is already in pending status.

 

"message""The current state of the item is Pending and the following action Submit cannot be implemented

 

I could avoid this by checking if the document is already in pending status before doing this action however there is no action to get the Approval Status of a document.

 

 

Status: New
Comments
Regular Visitor

The possibility get content appproval status would be a big step forward for the approval workflows in Microsoft flow. Now it's hard to check if a document is already approved or not which can cause problems like:Multiple people approving the same document -> flow runs multiple times, difficult to send a daily overview of documents that need approval.

New Member

We need a way to check what the status of an approval is

 

Currently have a flow which checks for modifications to a folder, once there is a modification a approval request is triggered

However... when this document gets appended to be approved or rejected, it updates the file again, causing another approval trigger

I just need to add in a condition to check the current approval status. However there is no way to do this

 

 

Anonymous
Not applicable

I am looking for something similar... I am in need of a flow that allows multiple people to be notified of a document update.. 

(Example)

User A adds a item to a spread sheet.

The flow then sends and approval to User B.

User B adds spec info to item User A added to the spread sheet

The flow then sends aditional approval to User C who finalizes the the item setup and then notifies User B it is complete..

 

 

 

 

Anonymous
Not applicable

need to send email notification after the doucment is manually aproved. since Approval Status field cannot be pulled, cannot use MS Flow



Advocate V

I am looking for this in Logic Apps as well.

The action Set Approval Content Status is available, but the Get ... action isn't...

 

Very critical

Advocate II

This issue is also affecting me. I want to filter a sharepoint document library and send a notification out for all documents that are still pending approval. But the Approval_x0200_Status column cannot be seen by flow. Very frustrating for something that should be simple.

Frequent Visitor

Hi everyone,

 

I agree that this is something that would be a big help for approval flows, however until they get around to it I do have a solution that is pretty easy to implement that should help.  You simply need to parse through a http call to: api/web/lists/GetByTitle(‘<Title>’)/items(<ID>)?$select=OData__ModerationStatus

 

More information and some step-by-step procedures can be found here: http://prairiedeveloper.com/2018/12/microsoft-flow-determine-the-approval-status-of-a-sharepoint-lis...

Advocate II

Also consider a Start Condition for your Trigger, for example SharePoint Create/Modify Item:

 

@equals(triggerBody()['{ModerationStatus}'],'Pending')

 

Would only start, when the Content Approval is on Pending Status (ModerationStatus)

https://docs.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-wssfo3/4342322d-6fab-4dc5-8ccd-b8...

https://www.techmikael.com/2019/08/update-to-using-microsoft-flow-for.html?m=1

 

 

Frequent Visitor

This is possible.  I do it now in our Content Approval Flows. 

Condition:  If Content Approval = Pending, YES>>>

Check out file

Check in file to publish/pending (because I need to insert some version history comments)

Get File Metadata (because this is necessary to get the Etag to make Sent Content Approval work.)

Set Content Approval to Approved.

Send Approval Email.

(If Condition:  If Content Approval = Pending, NO then I just Set Content Approval to Published, Get File Metadata, Set Content Approval to Approved, send Approval Email.  Skip the check out/check in.

AntoinetteB_0-1598979395732.png