Power Automate Adaptive Card Error

AdamNeo93-3861 0 Reputation points
2023-11-09T15:45:53.4966667+00:00

I have a flow which lists the rows present in an excel table. These are then filtered using a Filter Array action. I am then using initialize a variable for a string which the value holds the beginning of a JSON schema. It then uses an apply to each with the input value from the filter array "body('filter_array')". Within the apply to each is an append a string variable for each item from the filter array. This is because my adaptive card needs to be dynamic, posting many rows within one adaptive card. When running the flow, I get the below error.

Error and JSON below

{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.0",
  "body": [
    {
      "type": "TextBlock",
      "text": "Daily Report",
      "size": "ExtraLarge",
      "weight": "Bolder"
    },
    {
      "type": "Container",
      "items": [
        {
          "type": "ColumnSet",
          "columns": [
            {
              "type": "Column",
              "width": "stretch",
              "items": [
                {
                  "type": "TextBlock",
                  "text": "Number: @{items('Apply_to_each')?['Number']}",
                  "color": "Good"
                },
                {
                  "type": "TextBlock",
                  "text": "Case: @{items('Apply_to_each')?['Case']}"
                },
                {
                  "type": "TextBlock",
                  "text": "Created Date: @{items('Apply_to_each')?['Created [Date]']}"
                },
                {
                  "type": "TextBlock",
                  "text": "Priority: @{items('Apply_to_each')?['Priority']}"
                },
                {
                  "type": "TextBlock",
                  "text": "State: @{items('Apply_to_each')?['State']}"
                },
                {
                  "type": "TextBlock",
                  "text": "Sold Product: @{items('Apply_to_each')?['Sold Product']}"
                },
                {
                  "type": "TextBlock",
                  "text": "Category: @{items('Apply_to_each')?['Category']}"
                },
                {
                  "type": "TextBlock",
                  "text": "Vendor Ticket Ref.: @{items('Apply_to_each')?['Vendor Ticket Ref.']}"
                },
                {
                  "type": "TextBlock",
                  "text": "Contact: @{items('Apply_to_each')?['Contact']}"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "TextBlock",
      "text": "Incidents raised this month: @{outputs('Compose')}",
      "wrap": true
    }
  ]
}


"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: After parsing a value an unexpected character was encountered: {. Path 'body[1].items[0].columns[0].items[8]', line 46, position 70.\r\n   at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)\r\n   at Newtonsoft.Json.JsonTextReader.Read()\r\n   at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)\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, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in C:\\__w\\1\\s\\src\\processsimple\\Roles\\ProcessSimple.Data\\Components\\AdaptiveCards\\AdaptiveCardBuilder.cs:line 640\r\n   --- End of inner exception stack trace ---\r\n   at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in C:\\__w\\1\\s\\src\\processsimple\\Roles\\ProcessSimple.Data\\Components\\AdaptiveCards\\AdaptiveCardBuilder.cs:line 663\r\n   at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity) in C:\\__w\\1\\s\\src\\processsimple\\Roles\\ProcessSimple.Data\\Common\\Validation\\BotValidation.cs:line 875"

        }
Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,704 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,919 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JimmyYang-MSFT 51,716 Reputation points Microsoft Vendor
    2023-11-10T02:43:58.9833333+00:00

    @AdamNeo93-3861

    Power automate is not currently supported here on Q&A. The product group for Power automate actively monitors questions in dedicated forums here.
    https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.