Telegram Client icon

Telegram Client

Use Telegram Client API

Overview

This node enables sending files through the Telegram Client API. It allows users to send any type of file to a specified chat or channel by providing the chat identifier and the file path or URL. This is useful for automating file sharing in Telegram groups, channels, or direct messages, such as sending reports, images, documents, or other media automatically from workflows.

Practical examples include:

  • Automatically sending daily report PDFs to a team chat.
  • Sharing images or videos to a channel when new content is published.
  • Distributing documents or manuals to specific users or groups.

Properties

Name Meaning
Chat ID The target chat or channel ID or username where the file will be sent (e.g., @username or -100xxxx).
File Path Or URL The local path or a URL pointing to the file that should be sent.
Options Additional options for sending the file:
- Silent Send the message silently without notification (boolean).
- Caption Caption text to accompany the file message (string).
- Parse Mode How to parse the caption text; options are None, Markdown, or HTML.
- Limit Maximum number of items to return (used in some operations but available here as option).

Output

The node outputs JSON data with the following structure upon successfully sending a file:

{
  "success": true,
  "messageId": "<numeric message ID>",
  "date": "<timestamp of the message>",
  "filePath": "<the file path or URL sent>"
}
  • success: Indicates if the operation was successful.
  • messageId: The unique identifier of the sent message.
  • date: The date/time when the message was sent.
  • filePath: The original file path or URL used to send the file.

No binary data output is produced by this node; it only returns metadata about the sent message.

Dependencies

  • Requires an active Telegram Client API credential including session information and API keys.
  • The node uses the Telegram Client SDK internally to connect and perform actions.
  • Network access to Telegram servers is necessary.
  • Proper configuration of the Telegram API credentials within n8n is required before use.

Troubleshooting

  • Missing Credentials: If no valid Telegram API credentials are provided, the node will throw an error indicating missing credentials.
  • Invalid Chat ID: Providing an incorrect or inaccessible chat/channel ID or username may cause failures in sending the file.
  • File Not Found or Inaccessible: If the file path or URL is invalid or unreachable, the send operation will fail.
  • Connection Issues: Network problems or Telegram API downtime can cause connection errors.
  • Unsupported Operation: Using an unsupported operation value will result in an error.
  • To resolve errors, verify credentials, ensure correct chat IDs, confirm file accessibility, and check network connectivity.

Links and References

Discussion