Actions12
Overview
This node integrates with the Telegram Client API to perform various messaging and chat management operations. Specifically, the Send Message operation allows sending plain text messages to a specified Telegram chat or channel. This is useful for automating notifications, alerts, or any communication that needs to be sent programmatically to Telegram users or groups.
Practical examples include:
- Sending automated status updates to a team chat.
- Broadcasting announcements to a channel.
- Responding to user inputs in a chatbot workflow.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the chat or channel where the message will be sent. Can be an ID or username (e.g., @username or -100xxxx). |
| Message Text | The content of the text message to send. |
| Options | Additional settings for the message: |
| - Silent | If true, sends the message without notification (silent mode). |
| - Caption | Caption text for media messages (not used in Send Message but available in other operations). |
| - Parse Mode | How to parse the message text. Options are: None, Markdown, or HTML formatting. |
| - Limit | Maximum number of items to return (used in some operations, not relevant for Send Message). |
Output
The output JSON object for the Send Message operation includes:
success: Boolean indicating if the message was sent successfully.messageId: The unique identifier of the sent message.date: Timestamp of when the message was sent.text: The text content of the sent message.
Example output JSON:
{
"success": true,
"messageId": 12345,
"date": "2024-06-01T12:00:00Z",
"text": "Hello, this is a test message"
}
No binary data is output by this operation.
Dependencies
- Requires an active Telegram API session authenticated via API credentials (API ID and API Hash).
- Needs a valid Telegram client connection established through these credentials.
- The node depends on the Telegram Client SDK bundled internally.
- Proper n8n credential configuration is necessary to provide the required API authentication tokens.
Troubleshooting
- Missing Credentials: The node throws an error if no credentials are provided. Ensure the Telegram API credentials are configured correctly in n8n.
- Invalid Chat ID: Errors may occur if the chat ID or username is incorrect or inaccessible. Verify the chat/channel exists and the bot/user has permission to send messages there.
- Connection Issues: Network problems or invalid API keys can cause connection failures. Check internet connectivity and credential validity.
- Parse Mode Errors: Using unsupported parse modes or malformed markdown/html can cause message sending to fail. Use "None" if unsure.
- Silent Option Misuse: If silent is enabled but notifications are expected, the message will be delivered silently without alerting users.
If errors occur, enabling "Continue On Fail" allows processing subsequent items without stopping the entire workflow.