BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Send Voice" operation of the Message resource in this node allows users to send voice messages to a specified chat via the Bale Messenger API. This is useful for automating voice message delivery in chatbots, customer support, or notification systems where voice communication enhances user engagement or accessibility.

For example, a business could use this node to send personalized voice updates or alerts to customers in a chat group, or a bot could deliver voice instructions or confirmations automatically.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the voice message will be sent.
Binary Data Boolean flag indicating whether the voice data should be taken from a binary field in the input data.
Binary Property The name of the binary property containing the voice data to upload (used if Binary Data is true).
File ID Identifier of an existing voice file on Bale servers to send instead of uploading new data (if Binary Data is false).
Reply Markup Additional interface options for the message's reply interface. Options: Inline Keyboard, None, Reply Keyboard, Reply Keyboard Remove.
Inline Keyboard Configuration for an inline keyboard attached to the message, consisting of rows and buttons with text, callback data, or URLs.
Reply Keyboard Configuration for a custom reply keyboard with rows of buttons that send predefined replies when pressed.
Reply Keyboard Remove Options to remove a custom keyboard, including selective removal for specific users.
Reply To Message ID If sending the voice message as a reply, the ID of the original message to reply to.

Output

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

No binary output is produced by this operation since it sends data rather than returning files.

Example output structure (simplified):

{
  "message_id": 123,
  "chat": {
    "id": "chatId",
    "type": "private"
  },
  "date": 1610000000,
  "voice": {
    "file_id": "fileId",
    "duration": 10
  }
}

Dependencies

  • Requires an active Bale Messenger API authentication token configured in n8n credentials.
  • Uses the official Bale Messenger API endpoint https://tapi.bale.ai/bot.
  • Supports sending voice data either by uploading binary content from the workflow input or by referencing an existing file ID on Bale servers.

Troubleshooting

  • Invalid Chat ID: Ensure the Chat ID is correct and the bot has permission to send messages to that chat.
  • Binary Data Issues: If using binary data, verify that the binary property name matches the actual binary field in the input data and that the data is properly formatted.
  • File ID Not Found: When using a File ID, confirm that the file exists on Bale servers and is accessible.
  • Reply Markup Errors: Incorrectly structured reply markup (inline or reply keyboards) may cause API errors; validate the keyboard configuration carefully.
  • API Authentication Failures: Check that the API token credential is valid and has not expired.

Common error messages usually come from the Bale API and include details about invalid parameters or authorization failures. Reviewing the error message and ensuring all required fields are correctly set usually resolves these issues.

Links and References

Discussion