BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node integrates with the Bale Messenger API to send animated files (animations) as messages to a specified chat. It supports sending animations either by uploading binary data directly or by referencing an existing file ID on Bale servers. This node is useful in scenarios where you want to automate sending GIFs or other animation formats within chats, such as sending promotional content, fun reactions, or instructional animations.

For example, you can use this node to:

  • Send a welcome animation to new members joining a group.
  • Automatically reply with an animation based on user input or events.
  • Share animated product demos or tutorials in customer support chats.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the animation will be sent.
Binary Data Boolean flag indicating whether the animation data should be uploaded from a binary field in the input data (true) or sent by referencing an existing file ID (false).
Binary Property The name of the binary property containing the animation data to upload when Binary Data is true.
File ID Identifier of a file that already exists on Bale servers to send without uploading new data (used when Binary Data is false).
Caption Optional text caption to accompany the animation message (up to 1024 characters).
Reply Markup Additional interface options for the message's reply markup. Options include: Inline Keyboard, Reply Keyboard, Reply Keyboard Remove, or None. These add interactive buttons or custom keyboards to the message.
Inline Keyboard Configuration for inline keyboard buttons shown next to the message (only if Reply Markup is set to Inline Keyboard).
Reply Keyboard Configuration for a custom reply keyboard with buttons (only if Reply Markup is set to Reply Keyboard).
Reply Keyboard Remove Options to remove a custom keyboard from the client (only if Reply Markup is set to Reply Keyboard Remove).
Reply To Message ID If replying to an existing message, the ID of that original message.
File Name Filename to assign to the uploaded animation file (used when uploading binary data).

Output

The node outputs JSON data representing the response from the Bale Messenger API after sending the animation. This typically includes details about the sent message such as message ID, chat ID, date, and animation metadata.

No binary output is produced by this operation.

Example output structure (simplified):

{
  "message_id": 123,
  "chat": {
    "id": "chatIdValue",
    "type": "private"
  },
  "date": 1610000000,
  "animation": {
    "file_id": "fileIdValue",
    "file_name": "animation.gif",
    "mime_type": "image/gif",
    "file_size": 12345
  },
  "caption": "Optional caption text"
}

Dependencies

  • Requires an active Bale Messenger API token credential configured in n8n.
  • Uses the official Bale Messenger Bot API endpoint at https://tapi.bale.ai/bot.
  • Supports uploading binary data from incoming binary fields in n8n workflow items.

Troubleshooting

  • Invalid Chat ID: Ensure the Chat ID is correct and the bot has permission to send messages to that chat.
  • File Upload Issues: When using binary data, verify that the binary property name matches the actual binary field in the input data and that the file format is supported.
  • File ID Not Found: If using a File ID, confirm that the file exists on Bale servers and is accessible by the bot.
  • Caption Length: Captions longer than 1024 characters may cause errors; keep captions within this limit.
  • Reply Markup Misconfiguration: Incorrectly structured inline or reply keyboards may cause the API to reject the message. Use the provided UI options carefully.
  • API Errors: Network issues or invalid credentials will result in errors. Check the API token and network connectivity.

Links and References

Discussion