When Hangouts Chat sends an event to a bot, it includes certain data in the event payload; the exact payload depends on the event type. This event and payload are contained in the HTTP call sent to the bot's registered URL.
For some events, the bot may send a message to the chat in response to the event. This message is a JSON object, whose contents depend on what kind of message it is:
Simple text messages
These messages are displayed like any other chat message. They can include simple character formatting.
These messages contain all the details that Hangouts Chat needs to render a card in the chat room. These details include any text, special formatting, widgets, and other details used in the card.