Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Json Error with Adaptive Cards

(0) ShareShare
ReportReport
Posted on by 4

I'm using the template for When a new task is created in Planner notify a team. This flow worked a few times but is not working now. Can someone please assist me in fixing what is wrong in my json text? I've looked in other posts and tried adding commas to specific lines but none of the other solutions have been working. 

 

The following is the error that I receive. 

 

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: P. Path 'body[2].facts[0].value', line 22, position 33.
at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
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) in X:\bt\1188323\repo\src\processsimple\Roles\ProcessSimple.Data\Components\AdaptiveCards\AdaptiveCardBuilder.cs:line 503
--- End of inner exception stack trace ---
at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in X:\bt\1188323\repo\src\processsimple\Roles\ProcessSimple.Data\Components\AdaptiveCards\AdaptiveCardBuilder.cs:line 522
at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity) in X:\bt\1188323\repo\src\processsimple\Roles\ProcessSimple.Web\Common\Validation\BotValidation.cs:line 643

 

This is my json text in the Message field (which was automatically filled when using the template).

{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "New task created",
"spacing": "Medium",
"size": "Large",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "A new task has been created on Planner",
"size": "Medium",
"spacing": "None"
},
{
"type": "FactSet",
"facts": [
{
"title": "Title",
"value": "@{triggerOutputs()?['body/title']}"
},
{
"title": "Created date",
"value": "@{triggerOutputs()?['body/createdDateTime']}"
},
{
"title": "Due date",
"value": "@{triggerOutputs()?['body/dueDateTime']}"
}
]
}
],
"version": "1.2",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}

  • Gopala_Krishna Profile Picture
    1,491 on at
    Re: Json Error with Adaptive Cards

    @jcl-1394 

     

    I think the best solution here will be to raise a request with Support to check on why that is not working.

    They will be able to provide some detailed insights on the issue

  • jcl-1394 Profile Picture
    4 on at
    Re: Json Error with Adaptive Cards

    Hi @Gopala_Krishna,

     

    Sorry, I didn't have service for the last week. Yes, I tried copying and pasting the schema you provided. Unfortunately, it gave me the same error when I used the Dynamic content for Planner in that schema as well. 

     

    This was working before but ever since version 1.3, it doesn't work. Do you think this could be the reason why it isn't working? Would I just need to wait for version 1.3 to become compatible with Microsoft Teams?

  • Gopala_Krishna Profile Picture
    1,491 on at
    Re: Json Error with Adaptive Cards

    @jcl-1394 

     

    Have you tried executing the flow with above schema

    Did you still face any issue after that

  • jcl-1394 Profile Picture
    4 on at
    Re: Json Error with Adaptive Cards

    Thank you for the quick reply! My flow was posting adaptive cards in a Microsoft Teams channel when a new Planner Task is created - screenshot below. When I was using the adaptive card designer, it says: "Warning: The selected Target Version (1.3) is greater than the version supported by Microsoft Teams - Light (1.2)".

     

    The designer is really helpful, but I'm not sure how to test using the Planner task output, since it just places the Json text from the Planner output: @{triggerOutputs()?['body/title']} 

     

    Here are screenshots of how my flow is. Is it having an error with the Planner tasks' values because Power Automate is wanting it to be in version 1.3 but Teams only supports version 1.2?

     

    Planner to Adaptive Card Flow1.pngPlanner to Adaptive Card Flow2.png

  • Gopala_Krishna Profile Picture
    1,491 on at
    Re: Json Error with Adaptive Cards

    @jcl-1394 

     

    From the error information that you have shared it seems that the processing is failing at the place where you are selecting the power automate inputs in the JSON schema of the adaptive card.

     

    {
        "type""AdaptiveCard",
        "body": [
            {
                "type""TextBlock",
                "text""New task created",
                "spacing""medium",
                "size""large",
                "weight""bolder"
            },
            {
                "type""TextBlock",
                "text""A new task has been created on Planner",
                "size""Medium",
                "spacing""None"
            },
            {
                "type""FactSet",
                "facts": [
                    {
                        "title""Title",
                        "value""<<enter information>>"
                    },
                    {
                        "title""Created date",
                        "value""<<enter information>>"
                    },
                    {
                        "title""Due date",
                        "value""<<enter information>>"
                    }
                ]
            }
        ],
        "version""1.2",
    }
     
    Can you please try using the above schema and just replace the <<enter information>> with your flow outputs from where you are getting the required values. Everything else seems to be good in the schema.
     
    You can also try updating the schema version to 1.3 and check if that helps.
     
    To verify issues if any with schema you can use the adaptive card designer from the link - Designer | Adaptive Cards
     
    If the information shared helps you in resolving the issue, please consider giving a thumbs up 👍 and mark solution as resolved.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow