BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Upload Sticker" operation of the Sticker resource in this node allows users to upload a sticker file to Bale Messenger. This is useful for bot developers or chat administrators who want to add custom stickers to their Bale Messenger bots or sticker sets programmatically.

Typical scenarios include:

  • Uploading new sticker files to create or update sticker sets.
  • Automating the management of sticker content within a bot.
  • Enhancing user interaction by providing custom visual content.

For example, a bot could automatically upload and add new stickers based on user input or external triggers, enriching the chat experience with personalized or branded stickers.

Properties

Name Meaning
UserId The unique identifier of the user who owns the sticker set or to whom the sticker belongs.
Binary Property The name of the binary property in the input data that contains the sticker file to upload.

Output

The output JSON contains the response from the Bale Messenger API after uploading the sticker file. It typically includes metadata about the uploaded sticker file such as its ID and other relevant details returned by the API.

The node also supports binary data input for the sticker file, which means the actual sticker image or file is expected to be provided as binary data in the specified binary property.

Dependencies

  • Requires an active Bale Messenger API credential with a valid authentication token.
  • Uses the Bale Messenger API endpoint at https://tapi.bale.ai/bot.
  • The node depends on the node-telegram-bot-api library (adapted for Bale Messenger) and axios for HTTP requests.
  • Input binary data must be correctly provided in the workflow for the sticker file upload.

Troubleshooting

  • Missing or incorrect binary property: Ensure the binary property name matches the one containing the sticker file data; otherwise, the upload will fail.
  • Invalid user ID: The user ID must be valid and correspond to a user authorized to upload stickers.
  • API errors: Errors from the Bale Messenger API (e.g., invalid token, file format issues) will be logged and returned in the output JSON under error fields.
  • File encoding issues: The binary data must be properly encoded and accessible; corrupted or improperly formatted files will cause failures.
  • Credential issues: Make sure the API credentials are correctly configured in n8n and have sufficient permissions.

Links and References

Discussion