BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

This node interacts with the Bale Messenger API to perform various messaging-related actions. Specifically, for the Message resource and the Delete Chat Message operation, it allows users to delete a specific message in a chat by providing the chat ID and the message ID.

Common scenarios where this node is beneficial include:

  • Automatically removing outdated or incorrect messages from a chat.
  • Moderation bots that clean up inappropriate content.
  • Workflow automations that manage chat content dynamically.

Example use case:

  • A bot detects a command or trigger and deletes a previously sent message in a group chat to keep the conversation tidy.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the message to be deleted exists.
Message ID Unique identifier of the message to delete within the specified chat.

These two properties are required to identify exactly which message should be deleted.

Output

The output JSON contains a single field:

  • messageDeleted: A boolean value indicating whether the message was successfully deleted (true).

No binary data is output for this operation.

Example output:

{
  "messageDeleted": true
}

Dependencies

  • Requires an active Bale Messenger API authentication token (API key credential) configured in n8n credentials.
  • Uses the official Bale Messenger Bot API endpoint at https://tapi.bale.ai/bot.
  • The node depends on the node-telegram-bot-api library internally to interact with the Bale Messenger API.

Troubleshooting

Common Issues

  • Invalid Chat ID or Message ID: If either the chat ID or message ID is incorrect or the message does not exist, the deletion will fail.
  • Insufficient Permissions: The bot must have permission to delete messages in the target chat.
  • Expired or Invalid API Token: Authentication errors occur if the API token is invalid or expired.

Error Messages

  • Errors thrown by the API typically include details about why the deletion failed (e.g., "message to delete not found" or "bot lacks rights").
  • Network or connectivity issues may cause request failures.

Resolution Tips

  • Verify the chat ID and message ID values are correct and correspond to existing entities.
  • Ensure the bot has appropriate admin rights in the chat.
  • Check and refresh the API token credential if necessary.
  • Review API error responses logged in the node execution for more details.

Links and References

Discussion