Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node allows sending a message with a file attachment to a specified Telegram chat. It supports specifying the chat ID, the local file path of the file to be sent, an optional caption for the file, and options to reply to a specific message or thread within the chat. This is useful for automating file sharing in Telegram chats, such as sending documents, images, or other files programmatically.

Use Case Examples

  1. Automatically send a PDF report to a Telegram group chat every morning.
  2. Send an image file with a caption to a user in response to a trigger event.
  3. Reply to a specific message thread in a chat with a file attachment.

Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat where the file message will be sent.
File Path The local file system path to the file that will be sent as an attachment in the message.
File Caption An optional text caption to accompany the file 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

  • chat_id - The ID of the chat where the message was sent.
  • filePath - The local path of the file sent.
  • fileCaption - The caption text sent with the file, if any.
  • reply_to_msg_id - The ID of the message this file message is replying to, if specified.
  • message_thread_id - The thread ID within the chat where the message was sent, if specified.
  • result - The response object from the Telegram API confirming the message was sent.

Dependencies

  • Requires an API key credential for Telegram API access.

Troubleshooting

  • Ensure the file path is correct and the file exists locally before sending.
  • Check that the chat ID is valid and the bot or user has permission to send messages to that chat.
  • If the Telegram API returns errors about permissions or invalid file references, verify the session is active and logged in.
  • Large files may be rejected by Telegram; ensure the file size is within Telegram's limits.

Links

Discussion