Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Unanswered

How to return a list from flow to my bot response

(2) ShareShare
ReportReport
Posted on by

In my scenario, I am trying to query Lens DB for a list of TeamGroups. I can query that without issue and return a single value with no problem, and the bot can handle it set as a string. I can concatenate the string to make a comma separated list as a single string and it still works. Where things fall apart though is if I try to return a JSON array. Any ideas here? 

 

Ideally I would be able to return the list, let the user choose an item on the list to further drill down what they are looking for.

 

JSON Being returned is this:

{
"TeamGroupName": [
    "Business Insights",
    "Contact Management",
    "Content and Sites"
  ]
}
 
The Schema is:
{
    "type": "object",
    "properties": {
        "TeamGroupName": {
            "type": "array",
            "items": {
"type": "string"
            }
        }
    }
}
 

The Error is:

"ErrorMessage": "Cannot convert extracted value from template language expression '@parameters('e5e435ce-bfc7-4c0e-ae32-8e7a03c8e0f1')['TeamGroupName']' to target type 'None' for ContextVariable with id '209f66c0-3524-4a98-ac42-a4cca55a4d66'.  This may indicate a breaking signature change in an external dependency, such as a flow or skill output parameter type change." }

 

I can see the variable looks correct:

"e5e435ce-bfc7-4c0e-ae32-8e7a03c8e0f1": "{\r\n  \"TeamGroupName\": [\r\n    \"Business Insights\",\r\n    \"Contact Management\",\r\n    \"Content and Sites\"\r\n  ]\r\n}"

 

And lastly here are the Conversation Specifics:

"CurrentMessageDetail": {
          "TraceId": "JM8Ow",
          "ConversationId": "3w1vdPy1XTiH5wFP9Nt1uV-f",
          "CurrentProblemId": "8a4c5dfc-5a72-4f0c-851e-f6e41bf381d9",
          "ContentVersion": "760aadef-4f04-ea11-a811-000d3a334e11",
          "SentTime": "2019-11-11T07:03:18.0428103+00:00"
        }

Categories:
  • JonDoesFlow Profile Picture
    JonDoesFlow on at
    Re: How to return a list from flow to my bot response

    Hey

     

    i saw that List Variables are talked about in Wave 2 documentation 

     

    https://docs.microsoft.com/en-us/power-platform-release-plan/2021wave2/#power-virtual-agents

    I don’t see much other detail on this. Does anyone have anything ?

     

    thanks !

  • MarKol Profile Picture
    MarKol on at
    Re: How to return a list from flow to my bot response

    Lists(arrays) are currently not a supported type in Power VA - you cannot create variables on type List in your Dialog.

     

    Once support for Lists-type variables is added, the bot will be able to accept JSON Arrays in flow output and parse them into List variables. 

     

    Right now, even though flows are capable of retuning Lists (i.e: you JSON is correct), Power VA cannot read them until List variable type is supported.

  • JoeGill Profile Picture
    JoeGill 175 on at
    Re: How to return a list from flow to my bot response

    I tried returning and formatting arrays from Flow but had no luck either

    Sorry

    Joe

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

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics