BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node integrates with the Bale Messenger API to send various types of messages and perform chat-related actions. Specifically, for the Message resource and Send Sticker operation, it allows sending a sticker message to a specified chat. This is useful in scenarios where you want to automate sending stickers as part of your chatbot or messaging workflow, such as sending reactions, greetings, or visual responses.

For example, you can use this node to automatically send a sticker when a user triggers a certain event in your automation, enhancing engagement with rich media content.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the sticker will be sent.
Sticker ID Identifier of the sticker to send. You can pass a file ID of a sticker that already exists on Bale servers (recommended).
Reply To Message ID If the sticker message is a reply, this is the ID of the original message to reply to.

Additional properties related to keyboard markup are available but not typically used with sending stickers:

Name Meaning
Inline Keyboard Adds an inline keyboard next to the message with customizable buttons.
Reply Keyboard Adds a custom reply keyboard with options for users to select.
Reply Keyboard Remove Requests clients to remove the custom keyboard.

Binary data support:

Name Meaning
Binary Property Name of the binary property containing the sticker file data to upload instead of using a sticker ID.
File Name Filename to assign to the uploaded binary sticker data (e.g., "image.jpeg").

Output

The output JSON contains the response from the Bale Messenger API after sending the sticker. It typically includes details about the sent message such as message ID, chat ID, date, and sticker information confirming successful delivery.

No binary output is produced by this operation.

Example output structure (simplified):

{
  "message_id": 123,
  "chat": {
    "id": "chatId",
    "type": "private"
  },
  "date": 1610000000,
  "sticker": {
    "file_id": "stickerFileId",
    "width": 512,
    "height": 512
  }
}

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.
  • No additional external services are required beyond the Bale Messenger API.

Troubleshooting

  • Invalid Chat ID: Ensure the chat ID is correct and the bot has permission to send messages to that chat.
  • Invalid Sticker ID: The sticker ID must refer to a valid sticker file on Bale servers. Uploading a new sticker requires using other operations.
  • Binary Data Issues: If sending a sticker via binary data, ensure the binary property name matches the input data and the file format is supported.
  • API Errors: Network issues or invalid credentials will cause errors. Verify the API token and network connectivity.
  • Reply To Message ID: If replying to a message, ensure the message ID exists in the chat.

Common error messages usually come from the Bale API and indicate issues like unauthorized access, invalid parameters, or file not found. Review the error details returned in the node output for guidance.

Links and References

Discussion