
Hi there! I've got a flow that connects to a Postgres database and uses the values as dynamic content in an adaptive card for Teams. Everything is running smoothly except for two text input fields. I'm encountering an error when I try to link the dynamic content and I can't seem to figure out what's causing it. I've searched the forums but haven't found anything that solves the issue. Can you assist me with this? I'd really appreciate your help!
Adaptive Card:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "A new project has been submitted!",
"wrap": true,
"weight": "Bolder",
"size": "Large",
"fontType": "Default",
"color": "Default"
},
{
"type": "TextBlock",
"text": ", , ",
"wrap": true,
"size": "Medium",
"spacing": "None",
"isSubtle": true,
"id": "Mentions"
},
{
"type": "TextBlock",
"text": "Mavenlink Project Number: @{items('EachProject')?['Project_x0020_Id']}",
"wrap": true,
"id": "MavenlinkProjectNo",
"weight": "Default",
"color": "Default",
"separator": true
},
{
"type": "TextBlock",
"text": "Mavenlink Project Name: @{items('EachProject')?['project']}",
"wrap": true,
"id": "MavenlinkProject",
"color": "Default",
"weight": "Default"
},
{
"type": "TextBlock",
"text": "Project Type: @{items('EachProject')?['1_x0020_Type_x0020_of_x0020_Project']}",
"wrap": true,
"id": "ProjectType",
"weight": "Default",
"color": "Default",
"size": "Default"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Assign to me!",
"id": "asAssign"
},
{
"type": "Action.ShowCard",
"title": "View Details",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "Input.Text",
"value": "@{items('EachProject')?['X_x0020_A_x0020_DBAs_x0020_Data_x0020_Size_x0020_in_x0020_Scope']}",
"id": "DataSize",
"label": "Data Size (GB)",
"separator": false
},
{
"type": "Input.Text",
"value": "",
"id": "DataLocation",
"label": "Data Location",
"isMultiline": false
},
{
"type": "Input.ChoiceSet",
"choices": [
{
"title": "No-Complete via Forensics",
"value": "No-Complete via Forensics"
},
{
"title": "No-Complete by Client",
"value": "No-Complete by Client"
},
{
"title": "Yes-Arete engaged",
"value": "Yes-Arete engaged"
},
{
"title": "Yes-Arete does not have access",
"value": "Yes-Arete does not have access"
}
],
"value": "@{items('EachProject')?['X_x0020_A_x0020_DBAs_x0020_data_x0020_collection_x0020_required_x003f_']}",
"id": "CollectionRequired",
"label": "Collection Required?",
"style": "expanded",
"isRequired": false,
"errorMessage": "Please selection from one of the following options"
},
{
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Yes",
"value": "Yes"
},
{
"title": "No",
"value": "No"
},
{
"title": "Pending",
"value": "Pending"
}
],
"value": "@{items('EachProject')?['X_x0020_A_x0020_DBAs_x0020_TA_x0020_listing_x0020_provided_x003f_']}",
"id": "TAListing",
"label": "Threat Actor Listing Provided?",
"style": "expanded"
},
{
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Yes",
"value": "Yes"
},
{
"title": "No",
"value": "No"
},
{
"title": "Unknown",
"value": "Unknown"
}
],
"value": "@{items('EachProject')?['X_x0020_A_x0020_DBAS_x0020_BEC_x0020_date_x0020_range_x0020_applied_x003f_']}",
"id": "DateFilter",
"label": "BEC Date Filter Applied?",
"style": "expanded",
"isRequired": false
},
{
"type": "Input.Text",
"value": "@{items('EachProject')?['X_x0020_A_x0020_DBAs_x0020_BEC_x0020_confirmed_x0020_date_x0020_range']}",
"id": "ActualDateFilter",
"label": "BEC Confirmed Date Filter",
"isMultiline": false
},
{
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Yes-Malicious Terms",
"value": "Yes-Malicious Terms"
},
{
"title": "Yes-Message IDs from Access Logs",
"value": "Yes-Message IDs from Access Logs"
},
{
"title": "No",
"value": "No"
},
{
"title": "Unknown",
"value": "Unknown"
}
],
"value": "@{items('EachProject')?['X_x0020_A_x0020_DBAS_x0020_BEC_x0020_Scope_x0020_Reduction_x003f_']}",
"separator": true,
"id": "Culling",
"label": "BEC Scope Reduction?",
"style": "expanded"
},
{
"type": "Input.Text",
"value": "@{string(items('EachProject')?['X_x0020_A_x0020_DBAs_x0020_BEC_x0020_confirmed_x0020_malicious_x0020_terms'])}",
"isMultiline": true,
"id": "Terms",
"label": "BEC Confirmed Malicious Terms"
}
]
},
"id": "asViewDetails"
}
]
}
Error:
BadRequest. The request failed. Error code: 'InvalidJsonInBotAdaptiveCard'. Error 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: Bad JSON escape sequence: \U. Path 'actions[1].card.body[7].value', line 182, position 38. at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote) at Newtonsoft.Json.JsonTextReader.ParseValue() 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) --- End of inner exception stack trace --- at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity)'.
Expected:
Hi @Departed,
Can you clarify which controls don't work. You are talking about the Input.Text ones, which specifically? The ones with ids DataSize & ActualDateFilter?
I see you are referencing to items of a loop. Is this adaptive card action placed within an apply to each loop? Can you share a screenshot of your current flow setup? This will help the troubleshooting.