Actions32
- Bot Actions
- Callback Actions
- Chat Actions
- File Actions
- Message Actions
- Payment Actions
- Sticker Actions
Overview
The "Send Media Group" operation of the Message resource in this node allows sending a group (album) of photos or videos to a specified chat via the Bale Messenger API. This is useful when you want to send multiple media items together as a single message, such as photo albums or video collections.
Typical use cases include:
- Sharing event photo albums with a group.
- Sending multiple product images or promotional videos in one message.
- Delivering a set of related media files efficiently without sending separate messages for each.
For example, a user can specify several photos and videos with optional captions and formatting, and the node will send them as a grouped media message to the target chat.
Properties
Name | Meaning |
---|---|
Chat ID | Unique identifier for the target chat where the media group will be sent. |
Reply To Message ID | If the media group message is a reply, this is the ID of the original message to reply to. |
Media | The collection of media items to send. Each item includes: • Type: Either "Photo" or "Video". • Media File: A file identifier on Bale servers or an HTTP URL. • Additional Fields: – Caption: Text caption (0-1024 characters). – Parse Mode: How to parse the caption text; options are Markdown (Legacy), MarkdownV2, or HTML. |
Output
The output JSON contains the response from the Bale Messenger API after sending the media group. It typically includes details about the sent message(s), such as message IDs and status.
No binary data output is produced by this operation.
Dependencies
- Requires an active Bale Messenger API credential with a valid token.
- Uses the Bale Messenger API endpoint at
https://tapi.bale.ai/bot
. - The node depends on the
node-telegram-bot-api
library configured to work with Bale Messenger's API base URL. - No additional environment variables beyond the API credential are required.
Troubleshooting
- Invalid Chat ID: Ensure the Chat ID is correct and the bot has permission to send messages to that chat.
- Media Format Issues: Media files must be accessible either by Bale server file ID or via a valid HTTP URL. Invalid URLs or unsupported file types may cause errors.
- Caption Length: Captions longer than 1024 characters will likely cause errors; keep captions within limits.
- API Errors: Network issues or invalid credentials will result in failed requests. Verify API token validity and network connectivity.
- Empty Media Array: Sending an empty media array will fail; ensure at least one media item is provided.
Links and References
- Bale Messenger API Documentation
- Telegram Bot API - sendMediaGroup method (similar concept) (for reference on media group structure)
- Markdown and HTML Formatting Guide