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

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,480 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,480 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

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 303

#2
chiaraalina Profile Picture

chiaraalina 116 Super User 2026 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 94 Moderator

Last 30 days Overall leaderboard