Actions32
- Bot Actions
- Callback Actions
- Chat Actions
- File Actions
- Message Actions
- Payment Actions
- Sticker Actions
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 audio communication is preferred over text.
Typical use cases include:
- Sending pre-recorded voice alerts or announcements to users.
- Delivering personalized voice messages in customer engagement workflows.
- Automating voice-based notifications or reminders.
For example, a user can upload a voice recording as binary data or reference an existing file on Bale servers by its file ID and send it directly to a chat identified by its unique chat ID.
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 a voice file already stored on Bale servers to send instead of uploading new data. |
| Reply Markup | Additional interface options for the message's reply markup. Options: Inline Keyboard, Reply Keyboard, Reply Keyboard Remove, None. |
| Inline Keyboard | Configuration for an inline keyboard attached to the message, consisting of rows and buttons with optional callback data or URLs. |
| Reply Keyboard | Configuration for a custom reply keyboard with rows of buttons that users can tap to send predefined replies. |
| Reply Keyboard Remove | Options to remove a previously set custom keyboard, with flags to selectively remove it 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 identifiers and status confirmation.
If the voice message is uploaded from binary data, the node handles the binary content internally but does not output binary data itself.
Example output structure (simplified):
{
"message_id": 12345,
"chat": {
"id": "chatIdValue",
...
},
"voice": {
"file_id": "fileIdValue",
...
}
}
Dependencies
- Requires an active Bale Messenger API authentication token configured in the node credentials.
- Uses the Bale Messenger API endpoint at
https://tapi.bale.ai/bot. - Supports sending files either by uploading binary data or referencing existing files by their Bale server file IDs.
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 or been revoked.
Common error messages usually come from the Bale API and indicate issues like invalid parameters, unauthorized access, or malformed requests. Reviewing the API response details helps identify the root cause.
Links and References
- Bale Messenger API Documentation
- n8n Documentation on Custom Nodes
- Telegram Bot API (similar concepts) — useful for understanding message and keyboard structures similar to Bale Messenger.