Telegram CoPilot icon

Telegram CoPilot

袙邪褕 锌械褉褋芯薪邪谢褜薪褘泄 Telegram CoPilot

Actions56

小芯芯斜褖械薪懈械 → 袨褌锌褉邪胁懈褌褜 褋芯芯斜褖械薪懈械 褋 邪褍写懈芯

AI-generated

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. The node handles file existence checks, size limits for voice messages, and provides detailed error handling for common Telegram API issues.

Use Case Examples

  1. Sending a voice message from a local .ogg audio file to a chat.
  2. Sending an audio file from binary data received from a previous node, with an optional caption.

Properties

Name Meaning
Chat ID The identifier of the Telegram chat to which the audio message will be sent.
Audio Source Determines whether the audio is sent from a local file path or from 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 to accompany the audio message.
Binary Property The name of the binary property containing the audio data. Required if Audio Source is Binary Data.
Send as Voice Message Whether to send the audio as a voice message with waveform visualization (true) or as a regular audio file (false).
Reply to messageId Identifier of the message to which this audio message is a reply.

Output

JSON

  • operation - The operation performed, here it is 'sendMessageAudio'.
  • success - Indicates whether 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 audio message was sent.
  • audioSource - The source of the audio, either 'filePath' or 'binaryData'.
  • sendAsVoice - Boolean indicating if the audio was sent as a voice message.
  • binaryPropertyName - The name of the binary property containing the audio data, if applicable.
  • audioFilePath - The local file path of the audio file sent.
  • audioCaption - The caption text for the audio message.
  • reply_to_msg_id - The message ID this audio message is replying to.
  • fileSize - Size of the audio file in bytes.
  • fileExists - Boolean indicating if the audio file exists at the specified path.
  • fileExtension - The file extension of the audio file.
  • warning - Warning messages related to the audio file format or size.
  • errorDetails
    • message - Detailed error message from the Telegram API if an error occurred.
    • code - Error code from the Telegram API if an error occurred.
    • stack - Stack trace of the error if available.
  • errorType - Categorized type of error for easier troubleshooting.

Dependencies

  • Telegram API credentials (API ID, API Hash, Phone Number)

Troubleshooting

  • Ensure the audio file path is correct and the file exists when using local file path source.
  • Check that the binary property name matches the binary data property from the previous node when using binary data source.
  • Voice messages must be in .ogg format and under 20MB; otherwise, a warning or error will be shown.
  • Common Telegram API errors include user restrictions on receiving voice messages, expired file references, invalid file IDs, and chat write permissions. The node provides specific error messages for these cases.
  • If the Telegram client session is not logged in or closed, the node will prompt to login again with instructions.

Links

Discussion