Actions11
Message → Send Message
AI-generatedSummary
Send a message to a specified user or chat in Max messenger, optionally including text, attachments (images, videos, audio, files), and inline keyboard buttons with various actions.
Inputs
- Send To (required) — Select whether to send the message to a User or a Chat.
- User ID (required) — The numeric ID of the user to send the message to. Required if 'Send To' is User.
- Chat ID (required) — The numeric ID of the chat/group to send the message to. Required if 'Send To' is Chat.
- Message Text — The message text to send, up to 4000 characters. Can be empty if sending only attachments.
- Text Format — Format of the message text; can be Plain Text, HTML, or Markdown.
- Additional Fields — Optional extra parameters including attachments (binary data, URLs, or tokens for images, videos, audio, files), disabling link previews, inline keyboard button layouts, notification toggle, and reply-to message ID.
Output shape
a JSON object representing the sent message details as returned by the Max API
The message is sent to the specified user or chat with the given content and options. Attachments and inline keyboards are processed and included as part of the message. The node returns the API response JSON for further use. Errors during sending are handled with user-friendly messages.
Examples
Example 1: Send a plain text message to a user with notification
Set 'Send To' to User, provide 'User ID', enter text in 'Message Text', keep 'Text Format' as Plain Text, leave Additional Fields default, and set Notify to true.
Example 2: Send a message with an image attachment to a chat and disable link preview
Set 'Send To' to Chat, provide 'Chat ID', optionally enter 'Message Text', add an image attachment under Additional Fields with the file's binary data, and set 'Disable Link Preview' to true.