Brian's Integration and Automation Notes
  • Welcome!
  • Allow Me to Brag a Bit
  • About
  • Integrations
    • ConnectWise Home
      • Authentication
      • API Documentation
  • Automations
    • Teams Notifications Azure Bot
      • Acknowledgement
      • Considerations
      • The Basics/Getting Started
        • Create a Response Handler Workflow in Rewst
        • Getting the IDs from Teams
      • Two Stage Message Process
        • Formatting the Initial Message
        • Getting the Message IDs
        • Formatting the Message Update
      • Formatting Action Buttons
        • Approve/Deny
        • Assign Resource to Ticket
      • Working with the Responses
      • System Incident/Maintance Notifications
        • Admitting Defeat on the Database
        • The Workflow Structure
      • Resources
    • Automated GitHub/GitBook Update Notifications
      • Prerequisites
      • 1. Set up a Basic Workflow
      • 2. Fork the GitHub Repository
      • 3. Set up Automatic Updates
      • 4. Set up notifications in GitHub
      • 5. Set up Remaining Workflow Actions
  • ConnectWise PSA Actions
    • About
    • Assigning Resources to Tickets
    • Ticket Assignment Note
    • Unbundle Ticket
    • Sales Activity Assignment Note
Powered by GitBook
On this page
  1. Automations
  2. Teams Notifications Azure Bot
  3. Two Stage Message Process

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": [
          // 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. When formatting the message this time, do not forget to add the JSON for your action buttons. See the "Formatting Action Buttons" page for how I handled this.
        ],
        "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.

PreviousGetting the Message IDsNextFormatting Action Buttons

Last updated 1 year ago