Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Message → Send Message with Audio

AI-generated

Overview

This node operation sends an audio message to a specified Telegram chat. It allows users to provide the chat ID, the local file path of the audio file, an optional caption for the audio, and an optional message ID to reply to. This operation is useful for automating the sending of audio messages in Telegram chats, such as sending voice notes, music clips, or any audio content programmatically.

Use Case Examples

  1. Sending a voice note to a customer support chat automatically.
  2. Sharing an audio announcement in a group chat via automation.

Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat where the audio message will be sent.
Message File (Photo, Video, Document) The local file path to the audio file to be sent as a message.
Caption An optional caption or description to accompany the audio message.
Reply to messageId Optional message ID to which this audio message will be a reply.

Output

JSON

  • _ - Type of the sent message, here it will be 'sendMessage' with audio content
  • chat_id - ID of the chat where the message was sent
  • reply_to_message_id - ID of the message this audio message is replying to, if any
  • input_message_content
    • _ - Type of input message content, here 'inputMessageAudio'
    • audio
      * _ - Details of the audio file sent, including local file path
    • caption
      * _ - Caption text formatted as 'formattedText'

Dependencies

  • Telegram API accessed via TelePilot client

Troubleshooting

  • Ensure the Telegram account is logged in and the session is active; otherwise, the node will throw login-related errors.
  • Verify the local file path is correct and accessible to avoid file not found errors.
  • If the chat ID is invalid or the bot/user does not have permission to send messages, the operation will fail.
  • Common error messages include 'Unauthorized' (indicating login issues) and 'A closed client cannot be reused' (indicating session expiration). To resolve, re-login using the login operation.

Links

Discussion