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 / Power Automate / Adaptive Card Error - ...
Power Automate
Answered

Adaptive Card Error - InvalidJsonInBotAdaptiveCard

(0) ShareShare
ReportReport
Posted on by 11

Hello Everyone, I have a PA flow, that displays information to the users and collects their responses via an adaptive card ( deals with failures when it comes to executing certain SQL Procedures ) 
The flow was functioning well during our initial testing, but now all of a sudden we are faced with this error and seem to be stuck would appreciate everyone's help in the community to get this figured out, Thank you 🙂 

ERROR : 

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: After parsing a value an unexpected character was encountered: S. Path 'body[2].text', line 30, position 15

Adaptive card syntax : 
{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.2", "width": "Full", "msteams": { "width": "full" }, "body": [ { "type": "TextBlock", "text": "@{items('Apply_to_each')?['BATCH_NAME']}", "id": "Title", "spacing": "Medium", "horizontalAlignment": "Center", "size": "ExtraLarge", "weight": "Bolder", "color": "Accent" }, { "type": "TextBlock", "text": "JOB: @{items('Apply_to_each')?['JOBNUM']} \n ", "id": "acHeaderTagLine", "separator": true }, { "type": "TextBlock", "text": " @{items('Apply_to_each')?['OUTPUT']}\n ", "weight": "Bolder", "size": "ExtraLarge", "spacing": "None", "id": "acHeader" }, { "type": "TextBlock", "text": "Removed.", "id": "acInstructions", "wrap": true }, { "type": "TextBlock", "text": "Error resolution options", "id": "acPollQuestion" }, { "type": "Input.ChoiceSet", "placeholder": "Select from these choices", "choices": [ { "title": "RERUN_BATCH" , "value": "RERUN_BATCH" }, { "title": "TERMINATE_BATCH" , "value": "TERMINATE_BATCH" }, { "title": "DELETE_BATCH" , "value": "DELETE_BATCH" }, { "title": "RERUN_JOB" , "value": "RERUN_JOB" }, { "title": "CHANGE_RETURN_CODE_TO_0" , "value": "CHANGE_RETURN_CODE_TO_0" } ], "id": "acPollChoices" , "style": "expanded" } ], "actions": [ { "type": "Action.Submit", "title": "Submit", "id": "btnSubmit" } ] }

will attach a screenshot for more context , would appreciate the community guidance on this one ,



Sincerely,

Pranav Sankaran 

Categories:
I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi Pranav,

     

    The reason of the failure might be double quotes (") in the data from the database output. I would suggest adding compose action that will be used for storing the message json:

    ManishSolanki_0-1708487185364.png

    { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.2", "width": "Full", "msteams": { "width": "full" }, "body": [ { "type": "TextBlock", "text": "@{items('Apply_to_each')?['BATCH_NAME']}", "id": "Title", "spacing": "Medium", "horizontalAlignment": "Center", "size": "ExtraLarge", "weight": "Bolder", "color": "Accent" }, { "type": "TextBlock", "text": "JOB: @{items('Apply_to_each')?['JOBNUM']} \n ", "id": "acHeaderTagLine", "separator": true }, { "type": "TextBlock", "text": " @{items('Apply_to_each')?['OUTPUT']}\n ", "weight": "Bolder", "size": "ExtraLarge", "spacing": "None", "id": "acHeader" }, { "type": "TextBlock", "text": "Removed.", "id": "acInstructions", "wrap": true }, { "type": "TextBlock", "text": "Error resolution options", "id": "acPollQuestion" }, { "type": "Input.ChoiceSet", "placeholder": "Select from these choices", "choices": [ { "title": "RERUN_BATCH" , "value": "RERUN_BATCH" }, { "title": "TERMINATE_BATCH" , "value": "TERMINATE_BATCH" }, { "title": "DELETE_BATCH" , "value": "DELETE_BATCH" }, { "title": "RERUN_JOB" , "value": "RERUN_JOB" }, { "title": "CHANGE_RETURN_CODE_TO_0" , "value": "CHANGE_RETURN_CODE_TO_0" } ], "id": "acPollChoices" , "style": "expanded" } ], "actions": [ { "type": "Action.Submit", "title": "Submit", "id": "btnSubmit" } ] }

    just copy & paste the above lines in the compose action.

     

    Next, pass the output of compose action in the post message action:

    ManishSolanki_2-1708487335281.png

    Pls save & retest the flow.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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 > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard