cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AKB_2K
Level: Powered On

Get approver name from Start and wait for an approval (V2)

Hello,

 

I have created a flow to get approval from a "single" manager whenever new item is added to SharePoint list. 

I want to capture and store following information back to SharePoint list after the approver responds.

 

  • Approver name
  • Request sent date
  • Request approved date
  • Response
  • Comments

To achieve this I used Start and wait for an approval (V2). But I when I tried to update the approval information back to SharePoint list, on adding Approver name value in corresponding column value, FLOW is creating a loop. When I looked closely at the JSON, seems the approver name comes as part of a array and may be that is the reason  flow is creating a Apply to each loop automatically. JSON response is something like this.

  "responder": {
    "id": "02-----------------------------------",
    "displayName": "lastname, firstname",
    "email": "firstname.lastname@email.com",
    "tenantId": "e2b--------------------------------------",
    "userPrincipalName": "firstname.lastname@email.com"
  },
  "requestDate": "2019-06-12T17:15:56Z",
  "responseDate": "2019-06-12T17:16:50Z",
  "approverResponse": "Approved",
  "comments": "Test approver"
}

I wrote following JSON to get the Approver comments:

{
  "type": "object",
  "properties": {
    "comments": {
      "type": "string"
    }
  }
}

But dont know how to pull the approver displayName details. Can someone help?

 

Regards,

AK

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Get approver name from Start and wait for an approval (V2)

Hi @AKB_2K ,

 

Apply to each will appear automatically because Responses is an array, and Approval information you want to get is properties in this array element.

You could completely ignore Apply to each. If Approval type is First to respond, Apply to each will not affect the result.

Image reference:

8.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Get approver name from Start and wait for an approval (V2)

Hi @AKB_2K ,

 

Apply to each will appear automatically because Responses is an array, and Approval information you want to get is properties in this array element.

You could completely ignore Apply to each. If Approval type is First to respond, Apply to each will not affect the result.

Image reference:

8.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

AKB_2K
Level: Powered On

Re: Get approver name from Start and wait for an approval (V2)

Thanks for the info @v-bacao-msft. I will try it out today and post my findings.

 

If possible can you let me know if this same logic can be applied to email template too? Because after updating the sharepoint list, flow will have to send email to Requestor mentioning the "Approver name" along with datetimestamp of when it was approved/rejected.

 

Cheers!

AK

Community Support Team
Community Support Team

Re: Get approver name from Start and wait for an approval (V2)

Hi @AKB_2K ,

 

Thank for your reply!

 

You could try to configure Response summary in Body, which contains the "Approver name" along with datetimestamp of when it was approved/rejected.

36.PNG

You could also add some item information to identify the request.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 355 members 2,843 guests
Please welcome our newest community members: