BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node enables sending an animated file (animation) message through the Bale Messenger platform. It supports sending animations either by uploading binary data directly or by referencing a file already stored on Bale servers via a file ID. This node is useful for automating the delivery of GIFs or short looping videos in chat conversations, enhancing user engagement with rich media content.

Practical examples include:

  • Sending promotional animated banners to users in a chat.
  • Delivering animated stickers or memes automatically in response to triggers.
  • Sharing instructional animations or product demos within 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 taken from a binary field in the input data.
Binary Property Name of the binary property containing the animation data to upload (used if Binary Data is true).
File ID Identifier of an existing animation file on Bale servers to send instead of uploading new data.
Reply Markup Additional interface options for the message; can be one of: Inline Keyboard, Reply Keyboard, Reply Keyboard Remove, or None.
Inline Keyboard Configuration for inline keyboard buttons that appear next to the message (if Reply Markup is Inline Keyboard).
Reply Keyboard Configuration for a custom reply keyboard with buttons (if Reply Markup is Reply Keyboard).
Reply Keyboard Remove Options to remove a custom keyboard from the client (if Reply Markup is Reply Keyboard Remove).
Reply To Message ID If replying to a specific message, the ID of that original message.
Caption Text caption to accompany the animation, up to 1024 characters.
File Name Filename to assign to the uploaded animation file (used if Binary Data is true).

Output

The output JSON contains 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, and confirmation of successful delivery.

No binary output is produced by this operation.

Example output structure (simplified):

{
  "message_id": 12345,
  "chat": {
    "id": "chatIdValue",
    ...
  },
  "animation": {
    "file_id": "fileIdValue",
    "file_name": "example.gif",
    ...
  }
}

Dependencies

  • Requires an active Bale Messenger API token credential configured in n8n.
  • Uses the official Bale Messenger Bot API endpoint (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 Not Found: When using a File ID, verify that the file exists on Bale servers and the ID is valid.
  • Binary Data Issues: If sending binary data, confirm the binary property name matches the actual binary field in the input data and that the data is properly formatted.
  • Caption Length: Captions longer than 1024 characters may cause errors; keep captions within limits.
  • Reply Markup Misconfiguration: Incorrectly structured keyboards or markup options may lead to API errors; validate keyboard button configurations carefully.

Common error messages usually come from the Bale API and indicate issues like invalid parameters, unauthorized access, or malformed requests. Checking the exact API response message helps identify the root cause.

Links and References

Discussion