Customize chatbot messages
Zoom Chat chatbot messages can display information, such as text, images, and attachments. They can also display UI elements for user interactions, such as links, buttons, form fields, dropdowns and more.
Chat app messages also support Markdown and @mentions.
Base JSON structure
To send and edit chat app messages requires a base JSON structure, which forms the request body sent to the /im/chat/messages endpoint. Message customization is handled inside the "content" object.
{
"robot_jid": "{{bot_jid}}",
"to_jid": "{{to_jid}}",
"account_id": "{{account_id}}",
"user_jid": "{{user_jid}}",
"content": {
// custom message json here
}
}
For more information, see the Send chatbot messages endpoint.
Message types
The six chat app message types are message, actions, fields, select, attachments, and section. You can combine all of these types in one message, or in separate messages.
Message styles
In most message formats, you can customize the color, boldness, and italics of chat app message text. 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. For example, you can style buttons 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. It cannot be changed to guarantee distinct and consistent styling of message links for the user. The link text can, however, be edited to be bold or italicized.
You can add external links to a chat app message in the following ways: Message with Link, Message with Markdown, and link autodetection. For link autodetection always prepend 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"
}
]
}
Refer to the full JSON schema for each message type to see the styling options.
Chatbot Postman collection
To test sending all the chat app messages types, use the Zoom Chatbot Postman Collection.