Actions32
- Bot Actions
- Callback Actions
- Chat Actions
- File Actions
- Message Actions
- Payment Actions
- Sticker Actions
Overview
The "Leave Chat" operation in the BaleMessenger node allows the bot to leave a group, supergroup, or channel chat. This is useful when you want your bot to exit a chat it no longer needs to participate in, for example, after completing a task or when cleaning up resources.
Practical scenarios include:
- Automatically leaving a support group after resolving a user's issue.
- Exiting announcement channels once the bot's role there is finished.
- Managing bot presence dynamically based on workflow logic.
Properties
Name | Meaning |
---|---|
Chat ID | Unique identifier for the target chat from which the bot will leave (required). |
Output
The output JSON contains a single field:
leaved
: A boolean indicating whether the bot successfully left the chat (true
if successful).
No binary data is produced by this operation.
Example output:
{
"leaved": true
}
Dependencies
- Requires an active API authentication token credential for Bale Messenger.
- The node uses the Bale Messenger Bot API endpoint
https://tapi.bale.ai/bot
. - No additional external services are required beyond the Bale Messenger API.
Troubleshooting
Common issues:
- Invalid or missing Chat ID: Ensure the Chat ID provided is correct and the bot has permission to leave that chat.
- Authentication errors: Verify that the API token credential is valid and has sufficient permissions.
- Network or API downtime: Check connectivity and Bale Messenger service status.
Error messages:
- If the API call fails, the node may throw an error with details from the Bale Messenger API response.
- Typical errors include permission denied or chat not found; verify the bot's membership and rights in the chat.
Links and References
- Bale Messenger Bot API Documentation (general reference for API methods)
- n8n documentation on creating and using custom nodes (for context on node usage)