Actions40
- Chat Actions
- Custom Request Actions
- Group Actions
- File Actions
- Login Actions
- Message Actions
- User Actions
- Contact Actions
Overview
This node operation sends a photo message to a specified Telegram chat. It allows users to provide the chat ID, the local file path of the photo to be sent, an optional caption for the photo, and optional parameters to reply to a specific message or thread within the chat. This operation is useful for automating the sending of images in Telegram chats, such as sharing event photos, product images, or visual updates.
Use Case Examples
- Sending a promotional image with a caption to a marketing group chat.
- Sharing a photo in a customer support chat thread as a reply to a specific message.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the Telegram chat where the photo message will be sent. |
| Message Photo | The local file path to the photo file that will be sent in the message. |
| Photo Caption | An optional text caption to accompany the photo in the message. |
| Reply to threadID | If specified and not zero, the message will be sent as a reply within the given message thread in the chat. |
| Reply to messageId | If specified, the message will be sent as a reply to the message with this identifier. |
Output
JSON
photoMessagemessage_id- The unique identifier of the sent photo message.chat_id- The chat ID where the photo message was sent.photo- Details about the photo file sent, including file path and metadata.caption- The caption text sent with the photo, if any.reply_to_msg_id- The message ID this photo message is replying to, if specified.message_thread_id- The thread ID within the chat where the photo message was sent, if specified.
Dependencies
- Requires an API key credential for Telegram API access.
Troubleshooting
- Ensure the local file path to the photo is correct and accessible by the node to avoid file not found errors.
- Verify that the chat ID is valid and that the bot or user has permission to send messages in the specified chat.
- If the message fails to send, check for Telegram API errors such as 'CHAT_WRITE_FORBIDDEN' indicating lack of permission.
- If replying to a message or thread, ensure the IDs are correct and exist in the chat context.
Links
- Telegram Bot API - sendPhoto - Official Telegram API documentation for sending photo messages.