Message to chat
The Message to chat robot posts a message to a group chat, a project chat or a personal chat with an employee in Bitrix24 (Alaio) business processes and robots. The message is sent on behalf of the admin who installed the robot. It takes a chat ID and a formatted text. It returns a Success Y/N flag and the ID of the sent message.
The robot writes to the Bitrix24 (Alaio) messenger from a business process: into a team chat, a project chat or personally to an employee. A standard notification lands in the bell, while here the message goes into the chat feed, where every member sees it and can reply. The input is the chat and the text. The chat is given as chat123 or just 123 for a group chat, sg12 for a project chat and user_5 for a personal chat with an employee; when the field holds only a number, a separate setting decides whether it is a chat ID or an employee ID. The message is sent on behalf of the admin who installed the robot, and the admin must be a chat member. Typical use cases: tell the sales team about a new web request; post a stage change note into the project chat; message the responsible person directly. It returns Success Y/N and the message ID for the next steps.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Chat: chat123 or 123 — group chat, sg12 — project chat, user_5 — personal chat with an employee | string | yes | |
| How to read a number without a prefix | select | — | chat |
| Message text (posted on behalf of the admin who installed the robot; the admin must be a chat member) | text | yes |
What does the robot return?
| Parameter | Type |
|---|---|
| Success (Y/N) | string |
| Message ID | int |
What errors can the robot return?
The robot writes these messages to the business process log when it cannot complete a step. The text tells you what to fix in the settings or the data.
- Error: chat not recognised — use chat123, 123, sg12 or user_5
- Error: the message text is empty
- Sending failed: check that the chat exists and the admin who installed the robot is a member
Scenario: a new request in the sales team chat
- A lead marked urgent arrives from the website
- The robot posts a message with the client name and a link to the lead into the team chat
- A free manager replies in the chat and takes the lead