I am using Power Automate tools to send cards in MS teams.
This is my payload to send message in channel.
{
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.5",
"body":[
{
"type":"TextBlock",
"text":"@{body('Parse_JSON')?['title']}",
"size":"Large",
"weight":"Bolder",
"wrap":true
},
{
"type":"TextBlock",
"text":"@{body('Parse_JSON')?['text']}",
"isSubtle":"true",
"wrap":true
}
]
}
However, I get Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: r. Path ‘body[1].text’, line 15, position 26.,
this is because my data contains escaped double quotes (example below)
{
"title": "Testing Please Ignore ",
"text": ""reason":""
}
If i put clean text , request goes through and I can successfully post a message in a channel
cannot really see the issue here as you have already placed escape characters.
I reproduced the same thing and it works. Please tally with this flow if you’re doing something odd?