Microsoft Teams Bot icon

Microsoft Teams Bot

Send messages and cards via Microsoft Teams Bot

Card → Send

AI-generated

Summary

Send an adaptive card as JSON to a Microsoft Teams recipient, either a channel within a team or a direct chat with a user.

Inputs

  • card (required) — The adaptive card JSON content to send, defining the card structure and elements.
  • recipientType (required) — Specifies if the card is sent to a 'Channel' or a 'Chat (Direct Message)'.
  • teamId (required) — The ID of the Team containing the target channel; required when recipientType is 'channel'.
  • channelId (required) — The ID of the target channel within the specified Team; required when recipientType is 'channel'.
  • userId (required) — The ID or email address of the user to send the adaptive card to; required when recipientType is 'chat'.
  • options — Additional settings such as the card theme, which can be 'default', 'light', or 'dark'.

Output shape

a list containing one item with the Teams API response data for the sent adaptive card

The card JSON input is validated and sent through the Teams Bot using either Bot Framework or Graph API channels depending on recipient type. Errors related to bot installation may trigger automatic bot installation attempts before retrying. The output includes the API response, typically including message or activity details confirming the card was sent.

Examples

Example 1: Sending an adaptive card to a Teams channel

Set recipientType to 'channel', provide teamId and channelId, then specify the card JSON with the desired adaptive card content.

Example 2: Sending an adaptive card as a direct message to a user

Set recipientType to 'chat', provide userId (email or ID), and the card JSON describing the adaptive card to send.

Links

Discussion