Max icon

Max

Interact with Max messenger

Overview

This node allows sending messages via the Max messenger platform. Specifically, the "Send Message" operation under the "Message" resource enables users to send text messages to either individual users or group chats. It supports rich message formatting (plain text, HTML, Markdown), attachments (images, videos, audio, files), inline keyboards with customizable buttons, and options like disabling link previews or replying to specific messages.

Common scenarios include:

  • Sending notifications or alerts to a user or group.
  • Automating chat interactions with formatted messages and interactive buttons.
  • Sharing media files alongside text messages.
  • Replying to previous messages in a conversation thread.

Example use case: Automatically send a formatted Markdown message with an image attachment and inline keyboard buttons to a specific user when a certain event occurs.

Properties

Name Meaning
Send To Choose whether to send the message to a specific User or a Chat (group).
User ID The numeric ID of the user to send the message to (required if "Send To" is User).
Chat ID The numeric ID of the chat/group to send the message to (required if "Send To" is Chat).
Message Text The main text content of the message (up to 4000 characters).
Text Format Format of the message text: Plain Text, HTML, or Markdown.
Additional Fields Optional extra settings including:
- Attachments One or more attachments to include with the message. Each attachment can be an image, video, audio, or file, provided either as binary data from a previous node or via a URL.
- Disable Link Preview Whether to disable automatic link previews for URLs included in the message.
- Inline Keyboard Add one or more rows of buttons below the message. Buttons can have different intents (default, positive, negative) and types (callback, link, request contact, request location). Each button has text and associated data.
Notify Whether to notify chat participants about the new message (boolean).
Reply to Message ID Optionally specify the ID of a message to reply to, creating a threaded response.

Output

The node outputs JSON objects representing the sent message details returned by the Max messenger API. This typically includes message identifiers, status, timestamps, and any metadata related to the message sent.

If attachments are included, they are uploaded and referenced accordingly in the output but binary data itself is not directly outputted by this node.

Dependencies

  • Requires an API key credential for authenticating with the Max messenger service.
  • Uses internal helper functions to create a bot instance, validate and format text, handle attachments, process inline keyboards, and send messages via the Max API.
  • No additional external dependencies beyond the Max API and n8n's standard environment.

Troubleshooting

  • Missing or invalid User/Chat ID: The node requires numeric IDs for users or chats. Empty or non-numeric values will cause errors.
  • Message text too long: The message text must not exceed 4000 characters.
  • Invalid reply message ID: If specified, it cannot be empty.
  • Attachment issues: Attachments must be properly provided either as binary data or valid URLs. Incorrect input types or missing binary properties may cause failures.
  • Inline keyboard validation: Buttons require valid text and payloads; missing required fields will cause errors.
  • API authentication errors: Ensure the API key credential is correctly configured.
  • Error messages generally indicate which parameter is missing or invalid, helping to quickly identify configuration mistakes.

To resolve errors, verify all required fields are filled correctly, IDs are numeric, text lengths are within limits, and attachments/buttons are properly defined.

Links and References

  • Max Messenger API documentation (refer to official Max messenger developer resources)
  • n8n documentation on creating custom nodes and handling binary data
  • Markdown and HTML formatting guides for message content

Discussion