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 :
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,388 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,388 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

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 > Copilot Studio

#1
Valantis Profile Picture

Valantis 256

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 189 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 119

Last 30 days Overall leaderboard