I am using power automate to post a card to Microsoft Teams whenever a Microsoft Forms response is submitted. The Microsoft form includes a choice field ("Operating System") that has 3 options ("iOS", "Android", and "Both"). I am using Adaptive Card json to make the card look better when it is posted to MS Teams. Inside the Adaptive Card json I am using Dynamic content to include the responses from the MS Form that was submitted.
I am getting a failure whenever I try to include the choice field response (Operating System): (I think this is because the choice responses for operating system are not a text type buy possibly array?)
Could anyone provide a solution to handle the Operating System choice response?
Here is the error I am getting:
Line 39 is the line "text": "Operating System",(the dynamic content one) and if I select Android as the response this is the error that appears. If I select iOS as the response, the error will say "I" instead of "A".
Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The specified Teams flowbot adaptive card request is missing or invalid. The tracking Id is '{0}'. ---> Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: A. Path 'body[5].text', line 39, position 17.
EDIT: Adding all JSON for adaptive card:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "Title",
"size": "large",
"weight": "bolder",
"wrap": true
},
{
"type": "TextBlock",
"text": "@{outputs('Get_response_details')?['body/id#']}",
"wrap": true
},
{
"type": "TextBlock",
"text": "Description",
"size": "large",
"weight": "bolder",
"wrap": true
},
{
"type": "TextBlock",
"text": "@{outputs('Get_response_details')?['body/id#']}",
"wrap": true
},
{
"type": "TextBlock",
"text": "Operating System",
"size": "large",
"weight": "bolder",
"wrap": true
},
{
"type": "TextBlock",
"text": "@{outputs('Get_response_details')?['body/id#']}",
"wrap": true
}
]
}
EDIT: Adding MS Forms response json
{
"responder":"[email protected]",
"submitDate":"8/23/2023 2:55:52 PM",
"id1":"This is a title",
"id2":"This is a description",
"id3":"[\"iOS\"]",
"id4":"",
"id5":""
}



You need to construct the correct format for Input.ChoiceSet,Like below-