This is not a question, but a solution to a problem I have had: Reading the Approval Status. There are a few guides to getting this to work, but I kept running into problems, so I swore that I would write a guide here, when I finally found something that worked for me.
Problem: You want your Flow to be able to read the built-in Approval Status column, that is not available for Flow.
I will go though each action an explain. The solution is a two-step solution, as we need to get som info out midway, that we need to configure an action later in the flow.
First we make a call to the SharePoint list and get the Status.
Uri: _api/web/lists/GetByTitle('Documents')/items(<ID of element>})?$select=OData__ModerationStatus
Accept application/json; odata=verbose
Content-Type application/json; odata=verbose
Body: body('Send_an_HTTP_request_to_SharePoint' )['OData__ModerationStatus']
(I have to admit, that I really don't know what I'm doing in the Body section)
This step might be skipable, and you can just use the code from step 3.
Send the result of HTTP request action to your e-mail. This send e-mail action is only temporary and will be deleted later.
Body: Concat function is this: concat(body('Send_an_HTTP_request_to_SharePoint'))
Run the flow on an item in your document library and recieve the e-mail. The data should look something like this:
Copy all of this, as it is needed soon.
Delete the Send an email action - we don't need it anymore.
Insert the Parse JSON action, so we can convert the recieved data to something usefull.
Insert the Body from the HTTP Request.
Now, press the "Use sample payload to generate schema" in the buttom of the Parse JSON action.
Indsert the data you got in your e-mail:
Press Done and the result will show itself in the former window:
You can now insert the ID of the Approver Status into your flow:
If you have trouple using the format of the data in your actions, you can convert it with the Compose Action.
Insert the variable - and have "" around it.
Let me know if you have any problems with this.
Solved! Go to Solution.
Thanks for posting this. Looks like something i can use to troubleshoot. But can you please share the complete workflow?
I also had issue with configuring Uri as the Output value is not clear? How did you get it?
Nice post. Thanks for sharing. I am working with document sets in a document library with Sharepoint content approval enabled. I face the same issue. Does your solution work for items in document library? I tried but I think /_api/web/....
I am getting this message: "A potentially dangerous Request.Path value was detected from the client (<." It then lists the clientrequestID and the servicerequestID. I've checked everything over several times and the only thing I see different is that you have the purple "output" indicator on your Uri line while I only have what in indicated in your text as text - <ID of element>.
I don't have that flow anymore, but what I have posted is what was in the flow. I'm busy at the moment, so I don't have time to create a new sample flow.
The solution was created to handle approvals of documents in a documentlibrary.
Sorry about the missing explaination of the "output" value in the first screenshot. It was simply the ID of the item being processed e.g. "104".
Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Fill out a quick form to claim your user group badge now!
Check out the new Microsoft Flow Community Blog Topic Suggestion board!
Learn how to build the business apps that you need
Find out where you can attend!
Watch & learn from the Flow Community Video Gallery!