Customizing Messages


New: Chatbot messages now support Markdown and @mentions!

Zoom Chatbot messages can display information like text, images, and attachments, as well as UI components that the user can interact with like links, buttons, form fields and dropdowns and more.

To test sending the chatbot messages discussed in this section, install the Zoom Chatbot Postman Collection, and follow these instructions to setup your API credentials.

Run in Postman

The 6 Chatbot message types are message, actions, fields, select, attachments, and section. All of these types can be combined in one message, or used in seperate messages.

In addition to choosing a message type, each message can be configured further to customize the styles and functionality.

Base JSON Structure

All Chatbot messages contain a base JSON structure which forms the body of the POST request sent to the Zoom API /im/chat/messages endpoint. Message customization is handled inside the “content” object.

{
   "robot_jid": "{{bot_jid}}",
   "to_jid": "{{to_jid}}",
   "account_id": "{{account_id}}",
   "content": {
      // custom message json here
   }
}

Here is an example of simple Chatbot message request body.

{
   "robot_jid": "{{bot_jid}}",
   "to_jid": "{{to_jid}}",
   "account_id": "{{account_id}}",
   "content": {
      "head": {
         "text": "Hello World"
      }
   }
}

Styles

In most message formats, the color, boldness, and italics of Chatbot message text can be customized. The Windows and Mac Zoom Client support any combination of bold, italicized, and colorized text.

Reference:

Style Description
color Hex color code, changes the text color
bold Boolean, makes the text bold
italic Boolean, makes the text italic

For some message formats (Buttons, Dropdown, Links, Footer), text styling is handled differently or is not supported. Buttons, for example, can be styled from one of four color states: Primary, Default, Danger, and Disabled.

Reference:

Style Description
Primary Blue, changes the background color
Default White, changes the background color
Danger Red, changes the background color
Disabled Gray, changes the background color and makes the button unclickable

Link color is blue by default and cannot be changed in order to guarantee distinct and consistent styling of message links for the User. The link text can, however, be edited to be bold or italicized.

External links can be added to a Chatbot message in the following ways: Message with Link, Message with Markdown, and link autodetection. For link autodetection always prepand http:// or https:// to your urls if they are not included already. For example,

{
  "head": {
    "text": "I am a header",
    "sub_head": {
      "text": "I am a sub header"
    }
  },
  "body": [{
    "type": "message",
    "text": "https://zoom.us"
  }]
}

Email links can be added to a Chatbot messasge in the following ways: Message with Email Link, Message with Markdown, and link autodetection. For email link autodetection (currently unsupported on Windows), do not use mailto:, just use the email name@domain.ext. For example,

{
  "head": {
    "text": "I am a header",
    "sub_head": {
      "text": "I am a sub header"
    }
  },
  "body": [{
    "type": "message",
    "text": "name@domain.ext"
  }]
}

Refer to the Full JSON Schema for each message type to see the styling options.

Functionality

Messages with editable text, form fields, dropdowns, and buttons have unique functionality specified in the body of the POST request. When a User interacts with these four message types, a POST request specific to the message type will be sent to the Chatbot app’s Bot Endpoint URL.

For example, when a User clicks a button on a Chatbot message, the following JSON request body would be sent to the app’s Bot Endpoint URL:

{
  "event": "interactive_message_actions",
  "payload": {
    "accountId": "gVcjZnWWRLWvv_GtyGuaxg",
    "actionItem": {
      "text": "Click Me",
      "value": "click-me"
    },
    "channelName": "Tommy Gaessler",
    "messageId": "20190618205516496_ynICmz8_aw1",
    "original": {
      "head": {
        "sub_head": {
          "text": "I am a sub header"
        },
        "text": "I am a header"
      },
      "body": [
        {
          "type": "actions",
          "items": [
            {
              "style": "Primary",
              "text": "Click Me",
              "value": "click-me"
            }
          ]
        }
      ]
    },
    "robotJid": "v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us",
    "timestamp": 1560891332219,
    "toJid": "kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us/robot_v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us",
    "userId": "KdYKjnimT4KPd8KKdQt9FQ",
    "userJid": "kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us",
    "userName": "Tommy Gaessler"
  }
}

Refer to the Functionality section on the Editable Text, Form Field, Dropdown, and Buttons pages for more information.


Need Support?

The first place to look for help is on our Developer Forum, where Zoom Marketplace Developers can ask questions for public answers.

If you can’t find the answer in the Developer Forum or your request requires sensitive information to be relayed, please email us at developersupport@zoom.us.