Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

How to use Approval Comments w\out Apply for each

(0) ShareShare
ReportReport
Posted on by 53

Hi guys, 

 

A would like to create Approval Process(Wait for one response), so when i add Start and Wait approval Step, then use, for example, comments, my flow automatically add apply for each Response. How to build process with comments without this Apply for each?

 

In the Past i created another Approval Process and now I'm using them without any problems.

 

Thanks a lot

  • Pstork1 Profile Picture
    65,997 Most Valuable Professional on at
    Re: How to use Approval Comments w\out Apply for each

    The number of approvers is based on what you submitted to the approval.  If you used an array then its the length of the array.  If you used a semicolon delimited list you either need to know or need to Split() the list on semicolons and then do the length of the array.

     

    Whatever index you use will return either the comments, the approver's name, etc. depending on which field you ask for.

     

    In terms of the syntax, its close, its not exact since I didn't have an example in front of me.  I'll try to pull up an old copy and put the syntax example here.  But any example is going  to be dependent on the names and actions I used.  Yours may differ.  The syntax is correct, but may not match the name.

  • pennyland Profile Picture
    192 on at
    Re: How to use Approval Comments w\out Apply for each

    @pstork1

    How do i know which row in the array i am pulling?

    And when i used this formula in the expression i was told the expression is invalid.

    Which value would include the # of approvers or the # of approver's comments i want to grab?

     

    Thank you

  • Pstork1 Profile Picture
    65,997 Most Valuable Professional on at
    Re: How to use Approval Comments w\out Apply for each

    If you know how many approvers you have when you are writing the Flow then you can access the Responses Array using an index in JSON.  I don't have a specific example in front of me, but it would be something like this.

    body('Responses')?['value'][integer]?['Comments']
    
  • pennyland Profile Picture
    192 on at
    Re: How to use Approval Comments w\out Apply for each

    What if there are 3 levels of approvals? I was able to update a spreadsheet row with the comments from the 1st approver, but when i try to do so with the 2nd, it always gives me the comments of all approvers (array) ("Responses") instead of being able to choose the same "Response".

     

    How can i get the 2nd level approvers comments without having to use apply each?

     

    Approver 1:

     

    Capture.PNG

    Approver 2:

    Capture2.PNG

     

    I want approver 1 and their comments, and then approver 2 and his comments only.

     

    Thanks for your help!

  • Eugene-CHN Profile Picture
    53 on at
    Re: How to use Approval Comments w\out Apply for each

    Ok, I got it, 

     

    I have initialized variable for every comment. But its don't good when i need to develop big process, it needs to create a lot of variables. 

  • Verified answer
    Pstork1 Profile Picture
    65,997 Most Valuable Professional on at
    Re: How to use Approval Comments w\out Apply for each

    The problem is that the Approval action returns the responses in a collection, even if there is only one response.  That's why you get an apply to each.  If you are only sending out the approval to one person then you can manually code the values you are using from the response in JSON using the First() function. That will give you the First reply, comment, or whatever you specify. It works, but it requires inputting the raw json in the formula bar so its not easy for average people.  You can also key of the Outcome object, which returns the overall status, but then you won't have access to any of the comments etc.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow