Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Message → Send Message with Audio

AI-generated

Summary

Sends an audio file as a message in the specified Telegram chat. Can send as a regular audio file or as a voice message with waveform visualization.

Inputs

  • chat_id (required) — ID of the chat where the audio will be sent.
  • audioSource (required) — Whether to use a local file path or binary data from a previous node. Options: 'filePath' (Local File Path) or 'binaryData' (Binary Data).
  • audioFilePath (required) — Path to the local audio file. Required when audioSource is 'filePath'.
  • audioBinaryPropertyName (required) — Name of the binary property containing the audio data. Required when audioSource is 'binaryData'. Defaults to 'data'.
  • audioCaption — Optional caption for the audio file.
  • reply_to_msg_id — Identifier of the message to reply to.
  • sendAsVoice — Whether to send as a voice message (true) or as a regular audio file (false). Defaults to false.

Output shape

object

On success, includes the Telegram API result under 'result'. On failure, 'error' contains a message and 'success' is false. Additional metadata such as chat_id, audioSource, sendAsVoice, fileSize, fileExists, and any warnings are always returned.

Examples

Example 1: Send a local .ogg file as a voice message

Set audioSource to 'filePath', provide the file path, enable sendAsVoice.

Example 2: Send binary audio from a previous node as a regular audio file

Set audioSource to 'binaryData', specify the binary property name (default 'data'), leave sendAsVoice false.

Links

Discussion