Actions40
- Chat Actions
- Custom Request Actions
- Group Actions
- File Actions
- Login Actions
- Message Actions
- User Actions
- Contact Actions
Overview
This node operation sends an audio message to a specified Telegram chat. It supports sending audio either from a local file path or from binary data provided by a previous node. Users can optionally add a caption to the audio and choose to send it as a voice message with waveform visualization or as a regular audio file. This operation is useful for automating audio message delivery in Telegram chats, such as sending voice notes, music clips, or other audio content programmatically.
Use Case Examples
- Sending a voice note to a Telegram chat using a local .ogg file.
- Sending an audio message from binary data received from a previous node, with an optional caption.
- Automating audio notifications or alerts to a Telegram group or individual chat.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the Telegram chat where the audio message will be sent. |
| Audio Source | Determines whether the audio is sourced from a local file path or binary data from a previous node. |
| Audio File Path | The path to the local audio file to be sent. Required if Audio Source is 'Local File Path'. |
| Audio Caption | An optional caption text to accompany the audio message. |
| Binary Property | The name of the binary property containing the audio data when using binary data as the audio source. |
| Send as Voice Message | A boolean flag indicating whether to send the audio as a voice message with waveform visualization (true) or as a regular audio file (false). |
| Reply to messageId | Optional message ID to which this audio message will be a reply. |
Output
JSON
operation- The operation performed, here it is 'sendMessageAudio'.success- Boolean indicating if the audio message was sent successfully.error- Error message if the operation failed.result- The result object returned from the Telegram API after sending the message.chat_id- The chat ID where the message was sent.audioSource- The source of the audio, either 'filePath' or 'binaryData'.sendAsVoice- Indicates if the audio was sent as a voice message.binaryPropertyName- The binary property name used if audio source is binary data.audioFilePath- The file path of the audio file sent.audioCaption- Caption text sent with the audio message.reply_to_msg_id- Message ID to which this audio message was a reply.fileSize- Size of the audio file in bytes.fileExists- Boolean indicating if the audio file exists at the specified path.warning- Warnings related to the audio file format or size.errorDetailsmessage- Detailed error message from Telegram API if sending failed.code- Error code from Telegram API.stack- Stack trace of the error.
Dependencies
- An API key credential for Telegram API access is required.
Troubleshooting
- If the audio file path is incorrect or the file does not exist, the node will return an error indicating the file was not found.
- If the audio file size exceeds Telegram's limits (e.g., 20MB for voice messages), the node will return an error about file size.
- Errors from Telegram API such as 'User restricted receiving of video messages' indicate recipient restrictions; try sending as a regular audio file instead of a voice message.
- Errors like 'FILE_REFERENCE_EXPIRED' or 'FILE_ID_INVALID' suggest issues with the file reference; retry sending the file.
- 'CHAT_WRITE_FORBIDDEN' error means the bot or user does not have permission to send messages to the chat.
- If the Telegram session is not logged in or has been closed, the node will prompt to login again using the ChatTrigger node and loginWithPhoneNumber action.
Links
- TelePilot Login Guide - Instructions for logging in and managing Telegram sessions with TelePilot.