web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Reading Approval Status
Power Automate
Unanswered

Reading Approval Status

(5) ShareShare
ReportReport
Posted on by 52

Hi All,

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.

Solution:

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.

1.

First we make a call to the SharePoint list and get the Status.

image.png

Uri: _api/web/lists/GetByTitle('Documents')/items(<ID of element>})?$select=OData__ModerationStatus

Headers:

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)

 

2.

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.

image.png

Body: Concat function is this: concat(body('Send_an_HTTP_request_to_SharePoint'))

 

3.

Run the flow on an item in your document library and recieve the e-mail. The data should look something like this:

{"d":{"__metadata":{"id":"e6ad8e94-985d-4eb3-93c7-ff233a277874","uri":"https://XXX.sharepoint.com/sites/YYY/_api/Web/GetByTitle('Documents')/Items(7)","etag":"\"6\"","type":"SP.Data.Shared_x0020_DocumentsItem"},"OData__ModerationStatus":2}}

Copy all of this, as it is needed soon.

 

 

4.

Delete the Send an email action - we don't need it anymore.

 

5.

Insert the Parse JSON action, so we can convert the recieved data to something usefull.

image.png

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:

image.png

Press Done and the result will show itself in the former window:

image.png

 

6.

Done!

You can now insert the ID of the Approver Status into your flow:

image.png

 

7.

Bonus

If you have trouple using the format of the data in your actions, you can convert it with the Compose Action.

image.png

Insert the variable - and have "" around it.

 

Let me know if you have any problems with this.

 

Categories:
I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    on at

    Hi @BlueCar,

     

    Thank you for your sharing.

    It is a smart solution and I believe many people would benifit from it.

     

    Best regards,

    Alice

  • Santosh_M Profile Picture
    96 on at

    Hello,

     

    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?

     

    Thanks,


    Santosh

  • bpmpower Profile Picture
    25 on at

    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/....

     

    Thanks.

  • bpmpower Profile Picture
    25 on at

    Hi @BlueCar 

    Is it possible to post your entire FLOW and expand each step if possible please?

     

    Thanks

  • CindyZ Profile Picture
    on at

    I am getting this message: "A potentially dangerous Request.Path value was detected from the client (&lt;)."  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>.

     

    Thank you. 

  • BlueCar Profile Picture
    52 on at

    Hi @bpmpower@Santosh_M and @CindyZ 

    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".

  • CindyZ Profile Picture
    on at

    Thank you for the reply. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard