Actions32
- Bot Actions
- Callback Actions
- Chat Actions
- File Actions
- Message Actions
- Payment Actions
- Sticker Actions
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 need 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 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
}
No binary data is produced by this operation.
Dependencies
- Requires an active Bale Messenger API credential (an API token) configured in n8n.
- Uses the Bale Messenger API endpoint
https://tapi.bale.ai/bot/getChatMembersCount
to fetch the member count. - The node depends on the
node-telegram-bot-api
library internally adapted for Bale Messenger API calls andaxios
for HTTP requests.
Troubleshooting
Common issues:
- Invalid or missing Chat ID: Ensure the Chat ID is correct and corresponds to an existing chat.
- Authentication errors: Verify that the API token credential is valid and has necessary permissions.
- Network or API downtime: Check connectivity and Bale Messenger service status.
Error messages:
"Failed to get chat members count:"
followed by error details indicates a failure in the API request. This can be due to invalid parameters or network issues.- If the node throws an error related to credentials, re-authenticate or update the API token.
Links and References
- Bale Messenger API Documentation (general reference for Bale Messenger API)
- n8n Documentation for configuring credentials and using custom nodes