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"
}