Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Message → Send Message with Photo

AI-generated

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 an optional message ID to reply to. This operation is useful for automating the sending of photo messages in Telegram chats, such as sharing images in group chats or direct messages.

Use Case Examples

  1. Sending a photo to a customer support chat with a caption describing the image.
  2. Automating the sharing of event photos in a Telegram group.

Properties

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

Output

JSON

  • _ - Type of the message sent, e.g., 'sendMessage'
  • chat_id - ID of the chat where the message was sent
  • reply_to_message_id - ID of the message this photo message is replying to, if any
  • input_message_content
    • _ - Type of input message content, here 'inputMessagePhoto'
    • photo
      * _ - Indicates the photo file is a local file input
      * path - Local file path of the photo sent
    • caption
      * _ - Caption type, typically 'formattedText'
      * text - Text of the caption accompanying the photo

Dependencies

  • Telegram API accessed via TelePilot API credentials

Troubleshooting

  • Ensure the Telegram API credentials are correctly configured and the session is logged in; otherwise, the node will throw login-related errors.
  • Verify the local file path is correct and accessible; invalid paths will cause the message sending to fail.
  • If the node throws 'A closed client cannot be reused' or 'Unauthorized' errors, re-login is required using the login instructions provided in the error messages.

Links

  • TelePilot Login Guide - Instructions for logging into Telegram via TelePilot to enable message sending.

Discussion