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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Copilot Studio
Answered

pva approval comments

(0) ShareShare
ReportReport
Posted on by 16

Hello,

 

I creted a bot that requests an approval from an other user. The approver can write some comments before approving or rejecting the request. I tried to transfer approver's comments to the requester on bot's answer but I got the flow error 

The output you selected is inside a collection and needs to be looped over to be accessed. This action cannot be inside a foreach

 

Any help?

 

Thanks

 

I have the same question (0)
  • Expiscornovus Profile Picture
    33,501 Most Valuable Professional on at

    Hi @dioni_25,

     

    Can you share a screenshot of your flow setup? This will help with the troubleshooting.

  • dioni_25 Profile Picture
    16 on at

    Hi @Expiscornovus ,

     

     

     

    rpa.jpg

     

    I tried to add comments on the last step but I got the error The output you selected is inside a collection and needs to be looped over to be accessed. This action cannot be inside a foreach

  • Verified answer
    Expiscornovus Profile Picture
    33,501 Most Valuable Professional on at

    Hi @dioni_25,

     

    The comment field is part of the responses array. Since this is the comment of the first person to respond you could use an index [0] to refer to the first response item and retrieve the comment of that response. 

     

    You can use an expression like below for that:

     

    outputs('Start_and_wait_for_an_approval')?['body']['responses'][0]['comments']

     

    commentfield.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 168

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 130 Super User 2026 Season 1

#3
Arild Aarnes Profile Picture

Arild Aarnes 56 Super User 2026 Season 1

Last 30 days Overall leaderboard