Actions32
- Bot Actions
- Callback Actions
- Chat Actions
- File Actions
- Message Actions
- Payment Actions
- Sticker Actions
Overview
The node integrates with the Bale Messenger API to send various types of messages and media within chats. Specifically, for the Message resource and Send Audio operation, it allows sending audio files to a specified chat either by uploading binary data or by referencing an existing file on Bale servers.
This node is useful in scenarios where you want to automate sending audio messages, such as voice notes, music clips, or any audio content, directly into a chat. For example, a customer support bot could send prerecorded audio instructions, or a notification system could send alert sounds.
Properties
| Name | Meaning |
|---|---|
| Chat ID | Unique identifier for the target chat where the audio will be sent. |
| Binary Data | Boolean flag indicating whether the audio file should be uploaded from binary data available in the workflow's input (true) or sent by referencing an existing file ID on Bale servers (false). |
| Binary Property | The name of the binary property containing the audio data to upload when Binary Data is true. Defaults to "data". |
| File ID | Identifier of an existing audio file on Bale servers to send if Binary Data is false. |
| Caption | Optional text caption to accompany the audio message, limited to 0-1024 characters. |
| Reply Markup | Additional interface options for the message, including: None, Inline Keyboard, Reply Keyboard, or Reply Keyboard Remove. |
| Inline Keyboard | Configuration for inline keyboard buttons that appear next to the message, allowing interactive responses. |
| Reply Keyboard | Configuration for a custom reply keyboard with predefined options for users. |
| Reply Keyboard Remove | Option to remove a previously displayed custom keyboard. |
| Reply To Message ID | If the audio message is a reply, this is the ID of the original message being replied to. |
| File Name | When uploading binary data, this specifies the filename of the audio file (e.g., "audio.mp3"). |
Output
The output JSON contains the response from the Bale Messenger API after sending the audio message. This typically includes details about the sent message such as message ID, chat ID, date, and audio metadata.
If binary data is involved, the node does not output binary data itself but uses the binary input to upload the file.
Example output structure (simplified):
{
"message_id": 123,
"chat": {
"id": "chatId"
},
"date": 1610000000,
"audio": {
"file_id": "fileId",
"duration": 120,
"mime_type": "audio/mpeg",
"file_size": 123456
}
}
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 files via binary data from the workflow input or sending existing files by their Bale server file IDs.
Troubleshooting
- Invalid Chat ID: Ensure the
Chat IDis correct and the bot has permission to send messages to that chat. - File Not Found: If using
File ID, verify the file exists on Bale servers and the ID is valid. - Binary Data Issues: When uploading binary data, confirm the binary property name matches the actual binary field in the input data and that the binary data is properly formatted.
- Caption Length: Captions longer than 1024 characters may cause errors; keep captions within limits.
- Reply Markup Misconfiguration: Incorrectly structured keyboards can cause API errors; use the provided UI options carefully.
- API Errors: Network issues or invalid API tokens will result in errors; check credentials and network connectivity.
Links and References
- Bale Messenger Bot API Documentation (official API docs)
- n8n Documentation - Working with Binary Data
- Telegram Bot API (similar concepts) — Bale Messenger API is similar in design.