Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node, named "Telegram CoPilot," enables interaction with the Telegram API to perform various operations related to Telegram users, contacts, chats, messages, files, and groups. Specifically, for the Message resource and the Send Message with Photo operation, it allows sending a photo message to a specified chat in Telegram.

Common scenarios where this node is beneficial include automating Telegram messaging workflows such as:

  • Sending images with captions to Telegram chats or channels.
  • Replying to specific messages with photos.
  • Integrating Telegram messaging into broader automation pipelines (e.g., alerting, notifications).

Practical example: Automatically send a photo from a local file path to a Telegram group chat with an optional caption and optionally reply to a previous message.

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 image file that will be sent as a photo message.
Photo Caption Optional text caption to accompany the photo message.
Reply to messageId Optional message ID to which this photo message will be a reply.

Output

The node outputs an array of JSON objects representing the response from the Telegram API after sending the photo message. This typically includes details about the sent message such as message ID, chat ID, content metadata, timestamps, and status.

If the node sends binary data (the photo), it uses the local file path provided but does not output binary data itself; the output is purely JSON describing the sent message.

Dependencies

  • Requires an API authentication token credential for Telegram (referred generically as "an API key credential").
  • Uses an internal connection manager to handle Telegram client sessions.
  • Requires local access to the file system path specified for the photo.
  • The node depends on the Telegram TDLib-based API via a client wrapper.

Troubleshooting

  • Common issues:
    • Invalid or missing chat ID can cause failure to send the message.
    • Incorrect local file path or inaccessible file will prevent photo upload.
    • Not logged in or expired session will cause authorization errors.
  • Error messages:
    • "Session was closed or terminated. Please login again": Indicates the Telegram session is no longer valid; re-login is required.
    • "Please login": The node detected unauthorized access; user must authenticate again.
    • File-related errors if the local file path is invalid or unreadable.
  • To resolve, ensure correct credentials are configured, the Telegram session is active, and the local file path is accessible.

Links and References

Discussion