// BLOG — AUTOMATIONS — TEAMS BOT

FORMATTING THE
MESSAGE UPDATE

When you send an update to the message, that gets handled differently. The format of the message JSON changes to the below:

{
  "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": [
          // Place JSON for the updated message here.
          // Don't forget to add the JSON for your action buttons.
          // See the "Formatting Action Buttons" section below.
        ],
        "padding": "None",
        "msteams": { "width": "Full" }
      }
    }
  ],
  "msteams": { "width": "Full" }
}

Additionally, the sub-workflow for updating the message will also need the card_id and card_activity_id that you received in the response. Those are set as workflow inputs in Rewst for the sub-workflow as they are included in the URL for the PUT call.