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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Functioning JSON for A...
Power Automate
Answered

Functioning JSON for Adaptive card fails all validation

(0) ShareShare
ReportReport
Posted on by 716 Moderator

I inherited a functioning flow that users have requested be reused to create adaptive cards for other purposes.

 

Since it was relatively straightforward editing, I simply modified it directly in the Message property of the Generate Adaptive card and wait for response step.

The card works. It worked before and it works for me/us in the flows it is used in.

 

Then I was presented with a more interactive use case where I want to add a couple buttons and content that's going to take a little more effort. So, off to adaptivecard.io I go.

 

Only to discover that my JSON is invalid. EVERY single validator I put it into fails despite the fact that it generates a functioning card and responds to the user response. So since it's invalid, I can't simply paste it into the designer and modify.

 

Anyone have a clue what is wrong? The validators all tell me the problem is at the very end of the body. It seems like the problem is the trailing comma at the end of the last text block. But removing that causing it to hard fail and it won't even tell me where.

 

My hope is that I can fix this and then use this schema in the Designer tool to modify and then paste back into the flow step.

 

{
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "type": "AdaptiveCard",
 "version": "1.0",
 "body": [
 {
 "type": "TextBlock",
 "text": "@{outputs('Get_SPIFF_Submitter')}",
 "id": "acTitle",
 "spacing": "Medium",
 "horizontalAlignment": "Left",
 "size": "ExtraLarge",
 "weight": "Bolder",
 "color": "Accent"
 },
 {
 "type": "TextBlock",
 "text": "Submitted a SPIFF Approval Request ",
 "id": "acHeaderTagLine"
 },
 {
 "type": "TextBlock",
 "text": "**SPIFF Name:** @{outputs('Get_SPIFF_Name')}", 
 "size": "Medium",
 "id": "acSpiff",
 "separator": true
 },
		 {
		 	 "type": "TextBlock",
	 		"text": "**SPIFF Number:** @{outputs('Get_Record_ID_for_url')}",
		 	"id": "acSPIFFID"
	 	},
 {
 "type": "TextBlock",
 "text": "**SPIFF Details:** @{outputs('Get_Details')}",
 "id": "acDetails"
 },
 ],
 "actions": [
 {
 "type": "Action.Submit",
 "title": "Accept",
 "id": "btnSubmit"
 }
 ]
}

 

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,713 Super User 2026 Season 1 on at

    To solve problems like this, simply copy your JSON into a validator

     

    There is a comma in your JSON where it shouldn't be:

    Chriddle_0-1716016097354.png

     

  • DCHammer Profile Picture
    716 Moderator on at

    Tell me you didn't read my post without telling me.

    I tried that. EVERY validator I can find.

    Did you try removing that comma? Doesn't work does it?

     

    You know, I truly appreciate people that try to help.

    But people that just post what they find on Google without reading the OPs post and understanding what they've already tried and didn't work annoy the heck out of me.

  • VictorIvanidze Profile Picture
    13,081 on at

    Hi @DCHammer,

    I've just deleted this comma in validator and guess what? It said your JSON is valid now!

  • DCHammer Profile Picture
    716 Moderator on at

    Would you be so kind as to share the validator you used?

  • VictorIvanidze Profile Picture
    13,081 on at

    The one @Chriddle has kindly provided to you.

  • DCHammer Profile Picture
    716 Moderator on at

    And this is what happens when I use that validator. Just like every other. When I remove that comma, I then get the error below. So if you managed to get it to validate, would you be so kind as to save it in a text file and attach it?

    DCHammer_0-1716319629711.png

    ps. I'll even accept a screenshot of the whole thing after you remove the comma and successfully validate it. 😉

     

  • Verified answer
    DCHammer Profile Picture
    716 Moderator on at

    well well well. like is often the case, two things can be right at the same time.

    It did error every single time I tried on every validator. The consistency being that I copied and pasted directly from the flow editing tool.

    For grins I decided to copy it from this post and what do you know? It's valid after deleting that comma.

     

    So, the comma was clearly bad and whatever the heck that the browser and MS's web page added to the text blows up the validator. 

    Good lesson.

    Paste the text into something that will strip off absolutely any control and/or escape sequences.

     

    Solved another one. This place is amazing. 😄

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard