Actions12
Overview
The node enables sending media messages through the Telegram Client API. It supports sending various types of media such as photos, videos, audio files, voice messages, and documents to a specified chat or channel on Telegram. This is useful for automating communication workflows where multimedia content needs to be shared programmatically, such as broadcasting announcements with images, sharing video tutorials, or sending audio notes.
Practical examples:
- Sending a promotional photo to a Telegram channel.
- Sharing a recorded voice message in a group chat.
- Distributing PDF documents automatically to subscribers.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier or username of the target chat or channel (e.g., @username or -100xxxx). |
| File Path Or URL | The local path or web URL of the media file to send. |
| Media Type | The type of media being sent. Options: Photo, Video, Audio, Voice, Document. |
| Options | Additional settings for the message: |
| - Silent | Send the message without notification (boolean). |
| - Caption | Text caption accompanying the media message (string). |
| - Parse Mode | How to parse the caption text. Options: None, Markdown, HTML. |
| - Limit | Maximum number of items to return (used in other operations, not directly relevant here). |
Output
The output JSON object contains the result of the media message sending operation:
success: Boolean indicating if the message was sent successfully.messageId: The unique identifier of the sent message.date: Timestamp of when the message was sent.mediaType: The type of media that was sent (photo, video, audio, voice, document).
If the operation fails and "continue on fail" is enabled, the output will include an error message describing the failure.
Dependencies
- Requires a valid Telegram Client API credential including session string, API ID, and API hash.
- Uses the Telegram Client SDK internally to connect and interact with the Telegram API.
- Requires network connectivity to Telegram servers.
- No additional environment variables are explicitly required beyond the API credentials.
Troubleshooting
- No credentials provided: The node will throw an error if the Telegram API credentials are missing or invalid. Ensure proper API authentication details are configured.
- File path or URL issues: If the media file path or URL is incorrect or inaccessible, the message sending will fail. Verify the file location and permissions.
- Unsupported media type: Only the specified media types (photo, video, audio, voice, document) are supported. Using unsupported types will cause errors.
- Connection errors: Network issues or Telegram API downtime can cause connection failures. Retry later or check network settings.
- Error messages: Errors from the Telegram API are propagated; reading the error message helps identify issues like invalid chat IDs or insufficient permissions.