Actions12
Overview
The node implements a Telegram client that allows sending messages and performing various chat-related operations via the Telegram Client API. 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 notifications, alerts, or any textual information to Telegram chats or channels. For example, you could use it to send status updates from your application, alert a team about an event, or broadcast messages to a group.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the chat or channel 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 Send Message). - Parse Mode: How to parse the message text; options are None, Markdown, or HTML.- Limit: Maximum number of items to return (not applicable for Send Message). |
Output
The output JSON object for the Send Message operation contains:
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, this is a test message"
}
No binary data is output by this operation.
Dependencies
- Requires valid Telegram API credentials including an API ID, API hash, and a session string.
- The node uses the Telegram Client SDK internally to connect and interact with Telegram.
- Network access to Telegram servers is required.
- Proper configuration of the Telegram API credentials in n8n is necessary before using this node.
Troubleshooting
- No credentials provided: The node throws an error if Telegram API credentials are missing. Ensure you have configured the required API authentication token in n8n.
- Invalid Chat ID: If the chat ID or username is incorrect or inaccessible, the message sending will fail. Verify the chat/channel exists and the bot/user has permission to send messages there.
- Parse Mode errors: Using unsupported formatting in Markdown or HTML may cause message parsing errors. Use plain text or valid formatting.
- Network issues: Connection failures to Telegram servers can cause errors. Check network connectivity and retry.
- Operation not supported: If an unsupported operation value is set, the node will throw an error. Confirm the operation name is correct.
If the node is set to continue on failure, errors will be returned in the output JSON under the error field with details.