Overview
This node, named "Telegram Advanced," allows users to send messages to Telegram chats with the ability to include custom inline keyboards using raw JSON. It is useful for automating Telegram messaging workflows where interactive buttons or menus are needed within messages.
Common scenarios include:
- Sending notifications or alerts to specific Telegram chats.
- Creating interactive messages with inline keyboard buttons for user responses.
- Automating chat-based workflows that require dynamic message content and controls.
For example, a user can send a message "Hello, choose an option:" along with an inline keyboard containing buttons like "Yes" and "No" to a specified chat ID.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the Telegram chat where the message will be sent. |
| Message Text | The text content of the message to send to the Telegram chat. |
| Inline Keyboard JSON | Raw JSON string representing the reply_markup.inline_keyboard structure for Telegram inline keyboards. This allows defining buttons and their layout in the message. |
Output
The node outputs an array of JSON objects corresponding to each input item processed. Each object contains the response from the Telegram API's sendMessage method, which includes details about the sent message such as message ID, chat info, date, and text.
In case of errors, the output object includes:
success: falseerror: trueerrorMessage: Description of the error encounteredstatusCode: HTTP status code if availableerrorDetails: Additional error information from the Telegram API or internal error messagestroubleshooting: (optional) Array of troubleshooting tips when applicable
The node does not output binary data.
Dependencies
- Requires an API key credential for a Telegram Bot Token to authenticate requests.
- Uses the Telegram Bot API endpoints (
sendMessageandgetMe) via HTTPS. - Requires internet access to reach the Telegram API servers.
Troubleshooting
Common Issues
- Missing or invalid bot token: If no bot token is provided or it is incorrect, the node throws an error indicating the absence of the token or failure to verify it.
- Invalid JSON in Inline Keyboard: If the inline keyboard JSON is malformed, the node throws an error specifying the JSON parsing issue.
- API request failures: Errors during sending messages or verifying the bot token result in detailed error messages including HTTP status codes and possible causes.
Error Messages and Resolutions
"No Telegram Bot Token provided!"
Ensure you have configured the node with a valid Telegram Bot Token credential."Invalid JSON in inline_keyboard: ..."
Check the syntax of the JSON entered for the inline keyboard. It must be valid JSON.Errors mentioning
"Ошибка проверки доступности Telegram API"(Error checking Telegram API availability) with status code 404:
This usually means the bot token format is incorrect or the API endpoint is unreachable. Verify the bot token format (should look like123456789:ABCDEF...) and network connectivity.Errors mentioning
"Ошибка при отправке сообщения в Telegram"(Error sending message to Telegram) with status code 404:
Confirm the bot token is active and correct. Make sure the bot has permission to send messages to the specified chat ID.