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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Error code: 'InvalidJsonInBotAdaptiveCard'.

(0) ShareShare
ReportReport
Posted on by 14

Hi All,

 

I'm getting the below error when trying to set up an adaptive card to work with a dropdown.

 

BadRequest. The request failed. Error code: 'InvalidJsonInBotAdaptiveCard'. Error Message: '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: Unexpected end of content while loading JObject. Path 'body[0].columns[0].actions[0]', line 62, position 9. at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) --- End of inner exception stack trace --- at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity)'.

 

My message is set up as

 

{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": 2,
"items": [
{
"type": "TextBlock",
"text": "Workload Request Submitted",
"weight": "Bolder",
"size": "Medium",
"wrap": true,
"style": "heading"
},
{
"type": "TextBlock",
"text": "Submitted by @{items('Apply_to_each')?['DisplayName']}",
"isSubtle": true,
"wrap": true
},
{
"type": "TextBlock",
"text": "@{outputs('Get_response_details')?['body/r9be4a039142c49f690a9f1e6b4534c3e']}",
"isSubtle": true,
"wrap": true,
"size": "Default"
},
{
"type": "Container",
"$data": "${properties}",
"items": [
{
"type": "TextBlock",
"text": "@{outputs('Get_response_details')?['body/r59b35839aae445049493e7ae3e3ae50c']}",
"wrap": true,
"isSubtle": true
},
{
"type": "Input.ChoiceSet",
"id": "We just need to know which engineer will do this",
"value": "5",
"choices": [
{
"name": "@{items('Apply_to_each_2')?['EmailAddress']}",
"placeholder": ""
}
]
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit"
}

 

I've had a look through and struggling to understand so need some other eyes on it. Please if anyone could help it would be much appreciated.

 

Thanks

I have the same question (0)
  • Expiscornovus Profile Picture
    32,891 Most Valuable Professional on at
    Re: Error code: 'InvalidJsonInBotAdaptiveCard'.

    Hi @Carl1291,

     

    It looks like you are missing at least one closing square bracket ] and curly bracket } after the submit action button. I am also not seeing any dropdown values in the json for the input.ChoiceSet (title and value properties for each option). But I am guessing you want to populate those values dynamically?

     

    I would suggest to first start building a card with valid json before you add dynamic data to it.

     

    Looking at your current json structure, the adaptive card would look something like below, correct?

     

    adaptivecard_json.png

     

    You can test your json in the Adaptive Card designer:

    https://adaptivecards.io/designer

     

    {
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "type": "AdaptiveCard",
     "version": "1.3",
     "body": [
     {
     "type": "ColumnSet",
     "columns": [
     {
     "type": "Column",
     "width": 2,
     "items": [
     {
     "type": "TextBlock",
     "text": "Workload Request Submitted",
     "weight": "Bolder",
     "size": "Medium",
     "wrap": true,
     "style": "heading"
     },
     {
     "type": "TextBlock",
     "text": "Submitted By",
     "isSubtle": true,
     "wrap": true
     }
     ,
     {
     "type": "TextBlock",
     "text": "",
     "isSubtle": true,
     "wrap": true,
     "size": "Default"
     }
     ]
     }
     ]
     },
     {
     "type": "Container",
     "items": [
     {
     "type": "TextBlock",
     "text": "",
     "wrap": true,
     "isSubtle": true
     },
     {
     "type": "Input.ChoiceSet",
     "placeholder": "Placeholder text",
     "choices": [
     {
     "title": "Office 365",
     "value": "Office 365"
     },
     {
     "title": "Dynamics 365",
     "value": "Dynamics 365"
     },
     {
     "title": "Azure Services",
     "value": "Azure Services"
     },
     {
     "title": "Power Platform",
     "value": "Power Platform"
     }
     ]
     }
     ]
     }
     ],
     "actions": [
     {
     "type": "Action.Submit",
     "title": "Submit"
     }
     ]
    }

     

  • Carl1291 Profile Picture
    14 on at
    Re: Error code: 'InvalidJsonInBotAdaptiveCard'.

    Hi @Expiscornovus,

     

    Thanks for the response. Yeah thats exactly what i am looking for. My dynamic variable i am looking to show in the drop down is going to be from a Microsoft List that can be updated as time goes on rather than updating the variable in this Json.

     

    In my flow i have already pulled the data from the list using a Get Items so looking to integrate it in.

     

    Thanks

  • Expiscornovus Profile Picture
    32,891 Most Valuable Professional on at
    Re: Error code: 'InvalidJsonInBotAdaptiveCard'.

    Hi @Carl1291,

     

    You could use the values from the Get Items and convert it into the right format for the choices array of your adaptive card. I would suggest to use a Select action for that. You will need title/value pairs per item.

     

    Below is an example.

     

    1. Add a Select after your Get Items. 

    a. Make sure you use the title and value keys. 

    b. Map it to whatever fields you want to use from your list

     

    getchoiceitems.png

     

    2. Add the outputs of the Select to the Adaptive card json in the choices array 

    a. Below is an example code snippet

    {
     "type": "Input.ChoiceSet",
     "placeholder": "Select an Engineer",
     "id": "choiceEngineers",
     "choices": @{body('Select')}
    }
    

     

    bodyselect_engineers.png

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard