Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
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

 

  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 31,144 on at
    Re: pva approval comments

    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

  • dioni_25 Profile Picture
    dioni_25 16 on at
    Re: pva approval comments

    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

  • Expiscornovus Profile Picture
    Expiscornovus 31,144 on at
    Re: pva approval comments

    Hi @dioni_25,

     

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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics