I try to integrate automated messages into my firm's build pipelines.
The messages are sporadically ignored and not sent at all.
Weirdly enough, I get 202 code for every trial, even the ones that are not shown eventually in my workflows channel.
Here is my Python boilerplate for many different types of messages that I configured:
```json
@property
def payload(self):
return {
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": None,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": self.body
}
}
]
}
```
Also, when opening the workflows history I can find few failures with the message:
> Flow run failed. Action 'Post_card_in_a_chat_or_channel_1' failed: Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The specified Teams flowbot adaptive card request is missing or invalid. The tracking Id is '{0}'. ---> AdaptiveCards.AdaptiveSerializationException: Property 'type' must be 'AdaptiveCard' at AdaptiveCards.AdaptiveCardConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) …
Things I tried:
1. different types of message
```json
"type": "AdaptiveCard", #Or message instead
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": None,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "message", #Or AdaptiveCard instead
```
1. Un-nesting the message
1. increasing the version
1. Generating new URLs
Workflows Version 2.6.3
Teams version **26120.3106.4725.800**.