Max icon

Max

Interact with Max messenger

Overview

This node allows interaction with the Max messenger platform, specifically for managing chats and messages. The "Leave Chat" operation under the "Chat" resource enables the user to programmatically leave a chat or group by specifying its ID. This is useful in automation workflows where a bot or user needs to exit a conversation after completing certain tasks, such as after sending notifications or processing information.

Practical example:

  • Automatically leaving a group chat once a scheduled announcement has been sent.
  • Exiting a chat after detecting that no further interaction is needed.

Properties

Name Meaning
Chat ID The unique identifier of the chat to leave. Must be a non-empty string representing a numeric ID.

Output

The output JSON contains the response from the Max messenger API after attempting to leave the specified chat. It typically includes confirmation details about the action performed, such as success status or any relevant metadata returned by the service.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Max messenger API.
  • The node depends on internal helper functions to create a Max bot instance and perform the leave chat action.
  • Proper configuration of the Max messenger API credentials within n8n is necessary.

Troubleshooting

  • Invalid or empty Chat ID: The node throws an error if the Chat ID is missing, empty, or not a valid number. Ensure the Chat ID is correctly provided as a numeric string.
  • API authentication errors: If the API key credential is invalid or missing, the node will fail to authenticate. Verify the API key setup in n8n credentials.
  • Operation not supported: Attempting to use unsupported operations or resources will result in errors. Confirm that "leaveChat" is selected under the "chat" resource.
  • Network or API errors: General connectivity issues or API downtime may cause failures. Check network connectivity and Max messenger service status.

Links and References

  • Max messenger official API documentation (refer to their site for detailed API usage).
  • n8n documentation on creating custom nodes and using credentials.

Discussion