Telegram Client icon

Telegram Client

Use Telegram Client API

Overview

The node implements a Telegram client that interacts with the Telegram API to perform various chat-related operations. Specifically, for the Send Message operation, it sends a text message to a specified chat or channel on Telegram.

This node is useful in automation workflows where you want to programmatically send messages to Telegram chats or channels. For example:

  • Sending alerts or notifications from monitoring systems.
  • Broadcasting updates or announcements to a Telegram group or channel.
  • Automating customer support responses via Telegram.

Properties

Name Meaning
Chat ID The target chat or channel identifier where the message will be sent. Can be a username (e.g., @username) or a numeric ID (e.g., -100xxxx).
Message Text The actual text content of the message to send.
Options Additional optional settings:
- Silent: Send the message without notification.
- Caption: Caption for media messages (not used in this operation).
- Parse Mode: How to parse the message text; options are None, Markdown, or HTML.
- Limit: Maximum number of items to return (not applicable for sending messages).

Output

The output JSON object for the Send Message operation includes:

  • success: Boolean indicating if the message was sent successfully (true).
  • messageId: The unique identifier of the sent message.
  • date: The timestamp when the message was sent.
  • text: The text content of the sent message.

Example output JSON:

{
  "success": true,
  "messageId": 12345,
  "date": "2024-06-01T12:34:56Z",
  "text": "Hello, world!"
}

No binary data is output by this operation.

Dependencies

  • Requires an active Telegram API credential including session string, API ID, and API hash.
  • Uses the Telegram Client SDK internally to connect and interact with Telegram servers.
  • Requires network access to Telegram's API endpoints.
  • The node configuration must include valid Telegram API credentials.

Troubleshooting

  • No credentials provided: The node will throw an error if Telegram API credentials are missing or invalid. Ensure credentials are properly configured.
  • Connection errors: Network issues or incorrect API credentials can cause connection failures. Verify internet connectivity and credential correctness.
  • Invalid Chat ID: If the chat ID or username is incorrect or inaccessible, the message sending will fail. Double-check the chat identifier.
  • Unsupported parse mode: Using an unsupported parse mode may cause message formatting issues. Use only None, Markdown, or HTML.
  • API limits: Telegram enforces rate limits; sending too many messages in a short time may result in temporary blocking.

If the node is set to continue on failure, errors will be returned in the output JSON with success: false and an error message describing the issue.

Links and References

Discussion