Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node enables sending a photo message to a Telegram chat using the Telegram CoPilot API integration. It is designed for automating Telegram messaging workflows where users want to send images programmatically to specific chats.

Common scenarios include:

  • Sending notifications with images to Telegram groups or individual chats.
  • Automating photo sharing in response to events or triggers.
  • Integrating Telegram photo messages into broader automation pipelines, e.g., sending product images, alerts, or reports.

Example: Automatically send a photo from a local file path with an optional caption to a specified Telegram chat ID.

Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat where the photo message will be sent.
Message Photo Local filesystem path to the photo file that will be uploaded and sent in the message.
Photo Caption Optional text caption to accompany the photo in the message.
Reply to messageId (Optional) Identifier of a message in the chat to which this photo message will reply.

Output

The node outputs an array of JSON objects representing the result of the send operation. Each output item corresponds to the Telegram API response for the sent photo message, including details such as message identifiers and status.

The json output field contains the full Telegram message object returned by the API after successfully sending the photo.

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Telegram API authentication credential (an API key/token) configured in n8n.
  • Depends on the Telegram CoPilot service and its Node Connection Manager for managing sessions and invoking Telegram API methods.
  • The local file path provided must be accessible by the n8n instance running this node.

Troubleshooting

  • File Not Found: If the specified photo file path does not exist or is inaccessible, the node will fail. Ensure the file path is correct and readable by n8n.
  • Authentication Errors: If the Telegram session is not logged in or expired, errors like "Please login" or "Unauthorized" may occur. Use the login flow with the ChatTrigger node and follow the guide at https://telepilot.co/login-howto.
  • Permission Issues: Sending messages to certain chats may fail if the bot/user lacks permission ("CHAT_WRITE_FORBIDDEN"). Verify chat permissions.
  • Empty Caption Handling: An empty caption string is converted to null internally to avoid sending empty captions.
  • Reply Message ID: If replying to a message, ensure the message ID exists in the target chat; otherwise, the API call may fail.

Links and References

Discussion