Send an HTTP request to SharePoint during or after an approval in the SharePoint standard sitepage approval flow

Maria Sangild Mathiesen 20 Reputation points
2025-02-12T12:30:46.72+00:00

I have activated the standard approval flow from a SharePoint sitepage library. 

In the approval flow, I want to use the "Send an HTTP request to SharePoint", so I can update a sitecolumn with information about who actually did the approval.

If I set the request after "Set content approval status - Approved" has been done, I get a BadGateway error on the HTTP request.

If I instead set the request after "Start an approval", and before "Set content approval status - Approved", the Http request works, but I get a BadGateway error, this time for "Set content approval status - Approved"

If I instead set the HTTP request before "Set content approval status - Pending", everything works well.

The issue is then, that I set an information in a sitecolumn about who approved, before it is actually approved. Therefore, I would really like to first send the HTTP request after the approval has been done.

Does anyone know how I can send the HTTP request after the approval (either before or after the update of "Set content approval status - Approved").

Sample of BadGateway

2025-02-12_13-03-09

Sample that goes well
2025-02-12_13-16-45

 

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Answer accepted by question author
  1. Emily Du-MSFT 51,941 Reputation points Microsoft External Staff
    2025-02-19T10:09:05.8133333+00:00

    The page starts as ‘Draft’. Once it’s submitted for approval, it’ll go into ‘Pending’ status. From there it can be ‘Approved’ or ‘Rejected’. You can’t skip the order. If page is in ‘Draft’, you can’t approve nor reject it directly. It must be in the ‘Pending’ status before that.

    Here is an example flow for you to record approver and set approval status as Approved.

    In the flow, you could refer this article to update approver in a person column.

    1

    2

    Result:

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Emily Du-MSFT 51,941 Reputation points Microsoft External Staff
    2025-02-13T06:48:27.4133333+00:00

    Here is an example flow for you:

    1

    2


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Maria Sangild Mathiesen 20 Reputation points
    2025-02-14T08:56:46.29+00:00

    I want to use the standard approval flow from Microsoft: https://support.microsoft.com/en-us/office/configure-page-approval-using-power-automate-14ce6976-a0a7-427b-b4ab-d28d344a5222

    When that is created, I want to update a column with information on who did the approval. Without making a new draft (therefore the https request).

    Can someone try this in the standard approval flow?

    I can get the information if I set the "HTTP request" before the "Set content approval status - Pending" but not after or during.

    The issue with having it before the "Set content approval status - Pending" is that it haven't been approved yet. I really would like to get the information after the approval.

    The above answer do not help me. I have tried that, and I get Badgateway.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.