Telegram JSON Inline Menu icon

Telegram JSON Inline Menu

Sends messages to Telegram

Overview

This node allows editing the text of an existing Telegram message. It is useful when you want to update or correct a message that has already been sent in a chat or channel without sending a new message. Common scenarios include updating status messages, correcting typos, or dynamically changing content based on external events.

For example, you might use this node to:

  • Edit a notification message with updated information.
  • Change the content of a bot's response after receiving user input.
  • Update a message with new data fetched from an API.

Properties

Name Meaning
Message Type The type of the message to edit. Currently supports only "Message".
Chat ID Unique identifier for the target chat or username of the target channel (e.g., @channelusername). Used to specify where the message to edit is located.
Message ID Unique identifier of the message to edit within the specified chat.
Text The new text content to replace the existing message text.
Reply Markup Additional interface options for the message. Can be "Inline Keyboard JSON" to add an inline keyboard or "None" for no additional markup.
Inline Keyboard JSON JSON structure defining the inline keyboard buttons. Each button can have text and callback data or a URL link. This property is shown only if "Reply Markup" is set to "Inline Keyboard JSON".
Additional Fields A collection of optional fields:
- Disable WebPage Preview: Whether to disable link previews in the message.
Note: Some additional fields like "Disable Notification", "Reply To Message ID", and "Message Thread ID" are not applicable for this operation.

Output

The node outputs an array of JSON objects representing the response from the Telegram API after editing the message. The output JSON typically contains details about the edited message, such as its identifiers and updated content.

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Telegram API authentication token configured in n8n credentials.
  • The node uses Telegram Bot API endpoints to perform the edit operation.
  • No additional external services are required beyond Telegram itself.

Troubleshooting

  • Missing or incorrect Chat ID or Message ID: The node requires accurate identifiers to locate the message to edit. If these are wrong, the Telegram API will return errors indicating the message was not found.
  • Invalid JSON in Inline Keyboard: If using the inline keyboard JSON, ensure it is well-formed and follows Telegram's expected format. Malformed JSON will cause the request to fail.
  • File name missing for binary data: Although this operation does not commonly handle binary data, if binary input is used, a file name must be provided; otherwise, an error will occur.
  • API errors: Errors returned by Telegram (e.g., due to permissions or invalid parameters) will be surfaced by the node. Review the error message and verify the parameters and bot permissions.

Links and References

Discussion