Send Telegram Audio
Action ID: telegram_send_audio
Description
Send an audio file to a Telegram chat. This node allows you to send audio files (MP3, M4A, etc.) to individual users or group chats, with optional metadata like track name, performer, and duration. Supports file uploads, Telegram file IDs, or HTTP URLs.
Provider
Telegram
Connection
Telegram Bot Connection
The Telegram bot connection to use for sending the audio.
✓
telegram
Input Parameters
chat_id
string
✓
-
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
audio
string
✓
-
Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data.
business_connection_id
string
-
-
Unique identifier of the business connection on behalf of which the message will be sent
message_thread_id
integer
-
-
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
caption
string
-
-
Audio caption, 0-1024 characters after entities parsing
parse_mode
string
-
-
Mode for parsing entities in the audio caption. Can be 'Markdown', 'MarkdownV2', or 'HTML'
caption_entities
array
-
-
A JSON-serialized list of special entities that appear in the caption
duration
integer
-
-
Duration of the audio in seconds
performer
string
-
-
Performer of the audio
title
string
-
-
Track name
thumbnail
string
-
-
Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320.
disable_notification
boolean
-
-
Sends the message silently. Users will receive a notification with no sound
protect_content
boolean
-
-
Protects the contents of the sent message from forwarding and saving
allow_paid_broadcast
boolean
-
-
Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
message_effect_id
string
-
-
Unique identifier of the message effect to be added to the message; for private chats only
reply_parameters
object
-
-
Description of the message to reply to
reply_markup
object
-
-
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, etc.
Output Parameters
sent_message
object
The message that was sent (if successful).
success
boolean
Whether the audio was sent successfully.
error
string
The error that occurred if the audio was not sent successfully.
How It Works
This node sends an audio file to a specified Telegram chat. You can provide the audio in three ways: using a Telegram file_id (fastest), providing an HTTP URL that Telegram can fetch, or uploading the file directly. The audio can include metadata like track name, performer, and duration. Optional caption with formatting, thumbnails, and message effects can enhance the audio message. The node returns success status and either the sent message details or error information.
Usage Examples
Example 1: Send Audio by File ID
Input:
chat_id: "123456789"
audio: "AgACAgIAAxkBAAIBZ2Z-..."
title: "My Favorite Song"
performer: "Artist Name"
duration: 180
caption: "Check out this amazing track!"Output:
success: true
sent_message: {
"message_id": 123,
"chat": {
"id": 123456789,
"type": "private"
},
"audio": {
"file_id": "AgACAgIAAxkBAAIBZ2Z-...",
"duration": 180,
"performer": "Artist Name",
"title": "My Favorite Song"
},
"caption": "Check out this amazing track!"
}Example 2: Send Audio by URL to Group
Input:
chat_id: "-1001234567890"
audio: "https://example.com/music.mp3"
caption: "New podcast episode available"
parse_mode: "HTML"
disable_notification: falseOutput:
success: true
sent_message: {
"message_id": 456,
"chat": {
"id": -1001234567890,
"type": "supergroup"
},
"audio": {
"file_id": "AgACAgIAAxkBAAIBZ2Z-...",
"duration": 2400
},
"caption": "New podcast episode available"
}Example 3: Send to Channel with Silent Notification
Input:
chat_id: "@mychannel"
audio: "https://cdn.example.com/announcement.mp3"
title: "Important Announcement"
caption: "Listen to our latest update"
disable_notification: true
protect_content: trueOutput:
success: true
sent_message: {
"message_id": 789,
"chat": {
"username": "mychannel",
"type": "channel"
},
"audio": {
"file_id": "AgACAgIAAxkBAAIBZ2Z-..."
}
}Common Use Cases
Music Sharing: Send music tracks or audio clips to users
Podcast Distribution: Distribute podcast episodes to channels or groups
Voice Messages: Send audio messages as alternatives to text
Audio Alerts: Send audio alerts or notifications
Music Bot: Build a music sharing or streaming bot
Educational Content: Distribute audio lectures or lessons
Announcements: Send audio announcements to groups or channels
Error Handling
Invalid Chat ID
Chat ID doesn't exist or bot doesn't have access
Verify chat ID and ensure bot is member of chat/channel
Invalid Audio
Audio file is invalid or URL inaccessible
Check file format and ensure URL is publicly accessible
File Too Large
Audio file exceeds Telegram's size limit (50 MB)
Compress audio or reduce file size
Invalid File ID
File ID is expired or invalid
Use a valid file_id or provide URL/file
Authentication Error
Bot token is invalid or expired
Verify Telegram connection configuration
Permission Denied
Bot lacks permission to send messages
Check bot permissions in chat/channel
Message Too Long
Caption exceeds 1024 characters
Reduce caption length
Invalid Parse Mode
Parse mode is not supported
Use 'Markdown', 'MarkdownV2', or 'HTML'
Timeout Error
Request took too long to complete
Try again or check connection
Notes
File ID Optimization: Using file_id is fastest and doesn't require re-uploading. Telegram stores file IDs.
File Size Limit: Maximum file size is 50 MB. Larger files must be compressed.
Audio Metadata: Providing title and performer improves the user experience in Telegram's music player.
Captions: Use formatting (HTML or Markdown) for rich text captions with bold, italic, and links.
Silent Messages: Setting disable_notification=true prevents sound notifications for users.
Protected Content: Setting protect_content=true prevents forwarding and saving by users.
Message Effects: Message effects work only in private chats, not groups or channels.
Channel Access: To send to channels, use @channelname format and ensure bot is admin.
Last updated
Was this helpful?