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 :
Power Platform Community / Forums / Copilot Studio / Return array of object...
Copilot Studio
Unanswered

Return array of objects from JSON response to user

(0) ShareShare
ReportReport
Posted on by 58

I have a topic that includes a connector action which calls a customer connector. The JSON response includes an array of objects.

 

Schema:

{
 "type": "object",
 "properties": {
 "value": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "IssueId": {
 "type": "string"
 },
 "AppId": {
 "type": "string"
 },
 "Owner": {
 "type": "string"
 },
 "Custodian": {
 "type": "string"
 }
 },
 "required": [
 "IssueId",
 "AppId",
 "Owner",
 "Custodian"
 ]
 }
 }
 }
}

 

I would like to loop through the result and return each object to the user using an adaptive card, but I can't find a way to do this?

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

    Hi @MZSR,

     

    As far as I am aware there is no apply to each/for each control/step available in topic management.

     

    You might be able to workaround this by sending the objects to a Power Automate cloud flow and send the adaptive card from there.

     

    Cloud flows do have an apply to each action. You can send it as a pro-active messages from the bot:

    https://learn.microsoft.com/en-us/microsoft-copilot-studio/advanced-proactive-message#send-a-proactive-adaptive-card

     

  • MZSR Profile Picture
    58 on at

    Thank you @Expiscornovus! I am aware how to do this in a flow, however am not sure how this would then be returned to the bot. For example, should I create a foreach and append this all into one big string (which in my case will be long) before this is returned to the bot? And how will this work with the adaptive card? Will that be one adaptive card returned to the bot or multiple (packed in multiple messages)?

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @MZSR,

     

    That would be an adaptive card per object with the Owner as the recipient, so multiple cards would be sent in one flow run. You would loop through the items of your json and can you use the details of the current item in the Post adaptive card in a chat or channel action.

     

    Just make sure you use the Power Virtual Agents option in the Post as dropdown and your Copilot in the Bot dropdown. This way it will sent the card as your bot.

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard