Actions12
Overview
This node enables sending messages and performing various chat-related operations on Telegram using the Telegram Client API. It is useful for automating interactions with Telegram chats or channels, such as sending text messages, media, files, replying to messages, forwarding messages, managing chat membership, retrieving message history, searching messages, and deleting messages.
Common scenarios include:
- Automatically sending notifications or alerts to a Telegram channel or group.
- Uploading media or documents to a chat.
- Replying to specific messages programmatically.
- Forwarding important messages between chats.
- Managing chat members or joining/leaving chats via automation.
- Searching through chat history for specific content.
Example: Sending a text message to a Telegram channel when a new event occurs in an external system.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The target chat or channel identifier or username (e.g., @username or -100xxxx). |
| Message Text | The text content of the message to send. |
| Options | Additional options including: • Silent: Send without notification (true/false). • Caption: Caption text for media messages. • Parse Mode: How to parse message text ( none, markdown, html).• Limit: Maximum number of items to return (for applicable operations). |
Output
The output JSON structure varies by operation but generally includes:
success: Boolean indicating if the operation succeeded.- For sendMessage and replyToMessage:
messageId: ID of the sent message.date: Timestamp of the message.text: The message text sent.- For replies, also
replyToMessageId.
- For sendMediaMessage and sendFile:
messageId: ID of the sent message.date: Timestamp.mediaType(for media messages).filePath(for files).
- For getMessageHistory and searchMessages:
messages: Array of message objects retrieved.
- For deleteMessages:
deletedMessageId: ID of the deleted message.
- For getChatMembers:
members: Array of chat member objects.
- For forwardMessage:
originalMessageId: ID of the original message.forwardedMessages: Array of forwarded message objects.fromChatIdandtoChatId: Source and destination chat IDs.
- For joinChat and leaveChat:
- Flags indicating success and the chat ID.
If binary data is involved (e.g., media or files), it is handled internally by the Telegram client and not directly exposed in the output.
Dependencies
- Requires a valid Telegram Client API credential containing:
- A session string.
- API ID.
- API hash.
- The node uses the Telegram Client SDK to connect and perform actions.
- Network access to Telegram servers is required.
- No additional environment variables are needed beyond the provided credentials.
Troubleshooting
- No credentials provided: The node will throw an error if the Telegram API credentials are missing or invalid. Ensure you have configured the required API authentication token properly.
- Operation not supported: If an unsupported operation name is specified, an error is thrown. Verify the operation parameter matches one of the supported options.
- Connection issues: Network problems or invalid credentials may cause connection failures. Check internet connectivity and credential correctness.
- Message sending errors: Errors during sending (e.g., invalid chat ID, file path) will be reported. Use the "continue on fail" option to handle partial failures gracefully.
- Disconnect errors: Errors during client disconnect are logged but do not stop execution.
- Parsing errors: Using incorrect parse modes or malformed message text may cause errors. Use supported parse modes (
none,markdown,html).
Links and References
- Telegram Client API Documentation
- Telegram Bot API Overview (for general understanding)
- Markdown and HTML formatting in Telegram