Telegram Custom Reply Markup icon

Telegram Custom Reply Markup

Sends a simple message to Telegram with custom Reply Markup (JSON)

Overview

This node sends a custom text message to a specified Telegram chat, allowing the user to include advanced reply markup in JSON format. It is useful for automating Telegram messaging workflows where you want to send messages with interactive keyboards, inline buttons, or other Telegram-specific UI elements.

Common scenarios include:

  • Sending notifications or alerts to a Telegram group or individual chat.
  • Creating interactive chatbots that respond with custom keyboards or inline buttons.
  • Automating customer support messages with rich reply options.

Example: Sending a message with a custom keyboard containing buttons labeled "Button 1" and "Button 2" to a specific chat ID.

Properties

Name Meaning
Chat ID Unique identifier for the target chat or username. To find your chat ID, ask @get_id_bot on Telegram.
Text The text content of the message to be sent.
Reply Markup (JSON) A JSON object defining the reply markup for the message, e.g., custom keyboards or inline buttons.
Additional Fields Optional extra parameters to customize the message:
- Disable Notification Send the message silently without sound notification.
- Disable WebPage Preview Disable link previews for URLs in the message.
- Parse Mode How to parse the text formatting. Options: Markdown (Legacy), MarkdownV2, HTML.
- Reply To Message ID If replying to a specific message, provide its ID here.
- Message Thread ID Identifier of the forum topic (used in groups with topics).

Output

The node outputs an array of JSON objects representing the response from the Telegram API for each message sent. Each output item corresponds to one input item and contains the full API response data, which typically includes message metadata such as message ID, date, chat info, and the sent text.

No binary data is produced 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.

Troubleshooting

  • Failed to parse JSON Reply Markup: This error occurs if the JSON provided in the "Reply Markup (JSON)" field is invalid. Ensure the JSON syntax is correct and properly escaped.
  • API request errors: Errors returned from the Telegram API (e.g., invalid chat ID, unauthorized bot token) will be thrown. Verify the bot token and chat ID are correct and that the bot has permission to message the target chat.
  • Empty input items: If no input data is provided, the node returns an empty array and does nothing.
  • Silent failures: If "Continue On Fail" is enabled, the node will continue processing subsequent items even if some fail, returning error messages in the output.

Links and References

Discussion