Formatting the Initial Message

Below is the basic format of the JSON you want to send to your bot to create the initial message

{
  "activity": {
    "type": "message",
    "summary": "Set this to a summary that you want to appear in the desktop/mobile notification in Teams",
    "attachments": [
      {
        "contentType": "application/vnd.microsoft.card.adaptive",
        "contentUrl": null,
        "content": {
          "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
          "type": "AdaptiveCard",
          "version": "1.5",
          "body": [
            // Here you will place all of the JSON for the various pieces of your message that you want to send to Teams. I recommend using the Adaptive Card Designer and Actionable Messages Designers to figure out the formatting.
          ],
          "padding": "None",
          "msteams": {
            "width": "Full"
          }
        }
      }
    ]
  },
  "bot": {
    "id": "YOUR_BOT_ID",
    "name": "YOUR_BOT_NAME"
  },
  "channelData": {
    "team": {
      "id": "TEAM_ID"
    },
    "tenant": {
      "id": "TENANT_ID"
    },
    "channel": {
      "id": "CHANNEL_ID"
    },
    "teamsTeamId": "TEAM_ID",
    "teamsChannelId": "CHANNEL_ID"
  },
  "isGroup": true,
  "tenantId": "TENANT_ID"
}

Last updated