Microsoft is forcing us to use a workflow to process webhooks for Teams. I found that the current pre-defined webhook template did not work with their new implementation. The workflow element for posting a card did not seem to understand the MessageCard JSON that is in the template. I was able to get it working by changing to the AdaptiveCard schema as described by Microsoft.
A sample card is as follows
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "#{ticket.title}",
"color": "Accent"
},
{
"type": "TextBlock",
"text": "#{notification.changes}",
"wrap": true
},
{
"type": "TextBlock",
"text": "#{notification.body}",
"wrap": true
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.OpenUrl",
"title": "Ticket##{ticket.number}",
"url": "#{notification.link}"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}
Note: The default MS workflow uses webhook attachments. I did not have time to figure out how that should look, but managed to get the above Adaptive card working with a small customization to the template workflow. Maybe someone else can figure out the attachment concept.