Overview
This node sends a simple text message to a specified Telegram chat or channel using the Telegram Bot API. It is useful for automating notifications, alerts, or any kind of messaging directly into Telegram chats or channels by specifying the target chat ID or username.
Typical use cases include:
- Sending status updates or alerts from automated workflows.
- Broadcasting messages to Telegram channels.
- Interacting with users via Telegram bots by sending custom messages.
For example, you can configure this node to send a notification message to your team’s Telegram channel whenever a new order is received in your e-commerce system.
Properties
| Name | Meaning |
|---|---|
| Chat ID | Unique identifier of the target chat or the username of the target channel (to get the ID use @get_id_bot) |
| Text | The text content of the message to be sent |
| Reply Markup (JSON) | JSON object defining reply markup for the message (e.g., keyboard layout). Example: {"keyboard": [["Button 1"]], "resize_keyboard": true} |
Output
The node outputs an array of JSON objects representing the response from the Telegram API for each input item processed. Each output item corresponds to one message sent and contains the full JSON response returned by Telegram, which typically includes details about the sent message such as message ID, chat info, date, and text.
No binary data is output by this node.
Dependencies
- Requires a valid Telegram Bot API token configured as credentials in n8n.
- Uses the Telegram Bot API endpoint (
https://api.telegram.org) to send messages. - No additional external dependencies beyond the Telegram API and n8n's HTTP request helper.
Troubleshooting
- Invalid Chat ID or Username: If the chat ID or username is incorrect or the bot does not have permission to send messages to that chat/channel, the Telegram API will return an error. Verify the chat ID using the recommended @get_id_bot and ensure the bot is added to the chat/channel.
- Malformed JSON in Reply Markup: If the JSON provided in the "Reply Markup (JSON)" property is invalid, the node throws an error indicating it cannot parse the JSON. Ensure the JSON syntax is correct.
- API Authentication Errors: If the Telegram API token is missing or invalid, requests will fail. Confirm the API token credential is correctly set up.
- Empty Input Items: If no input items are provided to the node, it returns an empty array without making any API calls.
- Continue On Fail: If enabled, the node continues processing subsequent items even if some fail, returning error messages in the output for failed items.
Links and References
- Telegram Bot API - sendMessage method
- How to get chat ID using @get_id_bot (Telegram bot to retrieve chat IDs)