BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node interacts with the Bale Messenger API to perform various chat-related operations. Specifically, for the Chat - Get Chat Members Count operation, it retrieves the total number of members in a specified chat. This is useful for scenarios where you want to monitor group sizes, manage chat memberships, or trigger workflows based on the number of participants in a chat.

Practical examples:

  • Automatically checking the size of a group chat before sending announcements.
  • Triggering alerts or actions when a chat reaches a certain number of members.
  • Reporting or logging chat member counts for analytics purposes.

Properties

Name Meaning
Chat ID Unique identifier for the target chat whose member count you want to retrieve.

Output

The output JSON contains a single field:

  • memberCount: The number of members currently in the specified chat.

Example output JSON:

{
  "memberCount": 123
}

There is no binary data output for this operation.

Dependencies

  • Requires an active connection to the Bale Messenger API using a valid API authentication token.
  • The node uses the official Bale Messenger API endpoint (https://tapi.bale.ai/bot) to fetch chat information.
  • Proper credentials must be configured in n8n to authenticate API requests.

Troubleshooting

  • Common issues:

    • Invalid or missing Chat ID: Ensure the Chat ID provided is correct and corresponds to an existing chat.
    • Authentication errors: Verify that the API token credential is correctly set up and has sufficient permissions.
    • Network or API downtime: Check network connectivity and Bale Messenger service status.
  • Error messages:

    • "Failed to get chat members count:" followed by error details indicates a problem with the API request. This could be due to invalid parameters or authentication failure.
    • If the node throws an error about missing parameters, ensure the required Chat ID property is filled.
  • Resolution tips:

    • Double-check the Chat ID format and value.
    • Re-authenticate or update the API token credential if expired or revoked.
    • Review API usage limits or restrictions imposed by Bale Messenger.

Links and References

Discussion