cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ezequiel
Microsoft
Microsoft

"Bad Request" error when running an adaptive Card

Hi,

I'm new to adaptive cards and I'm testing a simple one, but getting the "BadRequest" error:

 

 

image.png

 

The JSON code looks like:

 

{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Hello...this is a test",
"size": "Medium",
"wrap": true,
"color": "Accent",
"weight": "Bolder"
} ],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}

 

and the error is:

 

{"statusCode":400,"headers":{"Pragma":"no-cache","x-ms-request-id":"westcentralus:4f792722-c484-4b7e-87cd-22b34c5096d7","x-ms-correlation-request-id":"4f792722-c484-4b7e-87cd-22b34c5096d7","x-ms-flow-mobile-ios-version":"1.3.0","x-ms-flow-routing-request-id":"WESTCENTRALUS:20191226T153746Z:4f792722-c484-4b7e-87cd-22b34c5096d7","Strict-Transport-Security":"max-age=31536000; includeSubDomains","X-Content-Type-Options":"nosniff","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Cache-Control":"no-cache","Date":"Thu, 26 Dec 2019 15:37:46 GMT","Content-Length":"1571","Content-Type":"application/json","Expires":"-1"},"body":{"error":{"code":"InvalidJsonInBotAdaptiveCard","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]', line 17, position 1.\r\n   at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)\r\n   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)\r\n   at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)\r\n   at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor) in X:\\bt\\1029746\\repo\\src\\processsimple\\Roles\\ProcessSimple.Data\\Components\\AdaptiveCards\\AdaptiveCardBuilder.cs:line 391\r\n   --- End of inner exception stack trace ---\r\n   at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor) in X:\\bt\\1029746\\repo\\src\\processsimple\\Roles\\ProcessSimple.Data\\Components\\AdaptiveCards\\AdaptiveCardBuilder.cs:line 395\r\n   at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity) in X:\\bt\\1029746\\repo\\src\\processsimple\\Roles\\ProcessSimple.Web\\Common\\Validation\\BotValidation.cs:line 585"}}}

 

Can you please give me a hand with this?

 

Thanks,

 

Ezequiel

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Alice

 

I finally decided to go with the suggestion of using Markdowns.

 

Thanks for the reply

Ezequiel

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @ezequiel 

 

Please have a look at this link

 

https://powerusers.microsoft.com/t5/Building-Flows/The-specified-Teams-flowbot-adaptive-card-request...

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Thanks @abm for your replied. I checked the link, and tried to replicate a solution, but I'm still getting the error. I also used https://adaptivecards.io/designer/ for creating this simple card. Do you have any other suggestion?

 

Thanks again

 

Ezequiel

Hi @ezequiel ,

 

Could you please share a screenshot of the configuration of your flow?

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Alice

 

I finally decided to go with the suggestion of using Markdowns.

 

Thanks for the reply

Ezequiel

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,392)