MAX is a VK Group messenger with a Bot API for direct chats and groups.
With MAX in Pailot you can:
- Receive messages — the workflow starts when a user writes to the bot (trigger)
- Send replies — to a person or a chat, with Markdown or HTML
Typical path: user writes → MAX trigger starts the workflow → an agent drafts a reply → a MAX “send message” block sends it back.
How to connect
The integration uses a Bot Token.
- Open business.max.ru
- Go to Chat bots → Integration
- Click Get token and paste it into the block
Tools
max_send_message
Send text to a user or a chat. After a trigger, pass sender.id (direct reply) or recipient.id (group).
| Parameter | Type | Required | Description |
|---|---|---|---|
botToken | string | Yes | Token from business.max.ru → Chat bots → Integration |
userId | number | No* | User ID. From the trigger: <TriggerBlock.sender.id> |
chatId | number | No* | Chat ID. From the trigger: <TriggerBlock.recipient.id> |
text | string | Yes | Text, up to 4000 characters |
format | string | No | markdown or html. Empty — plain text |
* Exactly one of userId or chatId.
Output: message, data (id, body, text, timestamp).
Trigger: max_webhook
Start the workflow when a user messages the bot or starts a dialog.
| Parameter | Description |
|---|---|
| Webhook URL | Generated for you |
| Bot Token | Token from business.max.ru |
| Webhook Secret | Optional secret (5–256 chars: A–Z a–z 0–9 _ -). If set, MAX sends it in X-Max-Bot-Api-Secret. Recommended in production |
A webhook is an inbound HTTP request from MAX. Save the token (and the secret if you set one) on the block — inbound messages will start the workflow.
Trigger outputs: message.id / text / date / messageType, sender.id / username / firstName / lastName / isBot, recipient.id, updateType (message_created, bot_started), timestamp, userLocale.
Typical workflow
[MAX trigger] → [Agent] → [MAX send message]- The trigger receives the inbound text
- The agent reads
<MAX1.message.text>and drafts a reply - Send: put
<MAX1.sender.id>in User ID
Limits
| Limit | Detail |
|---|---|
| Length | 4000 characters max |
| Format | Markdown and HTML; omit format for plain text |
| Recipient | Either userId or chatId, not both |
| Docs | dev.max.ru/docs-api |