AdaptiveCard Response for Teams

Hello everyone, I’m using the “Create Chat message” node for Teams and I’d like to be able to send messages in “Adaptive Card” format. The node’s configuration only allows for Text or HTML formats. Just to be sure, I tested both options, and the text containing the JSON structure of my Adaptive Card arrives and is displayed as plain text, not interpreted.

The other solution is to use a Microsoft API call, but that’s a shame because everything is already available in n8n to do it. The contentType would just need to be set to “application/vnd.microsoft.card.adaptive”.

Is there any planned improvement?

Thanks in advance.

Information on your n8n setup

  • n8n version:2.25.7
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • Operating system:Linux

@flipflip you’ve hit a real limit of the native node, not a mistake on your end. Teams adaptive cards don’t go in the message body or its contentType. The body stays html with an placeholder, and the card rides in a separate attachments array, which the Create chat message node can’t build, so your card renders as plain text.

No native support yet, so use the HTTP Request node (reuse your Teams OAuth2 credential via Predefined Credential Type, so no new auth): POST to graph.microsoft.com/v1.0/chats/{chatId}/messages with:

{
  "body": { "contentType": "html", "content": "<attachment id=\"CARD_GUID\"></attachment>" },
  "attachments": [
    { "id": "CARD_GUID", "contentType": "application/vnd.microsoft.card.adaptive", "content": "{STRINGIFIED card JSON}" }
  ]
}

Two gotchas: the attachment content must be a stringified JSON string, and its id must match the placeholder.

Perfect, it’ ok !
Thank’s