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
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']
Hi @Expiscornovus ,
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
Hi @dioni_25,
Can you share a screenshot of your flow setup? This will help with the troubleshooting.