Actions23
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
The "Edit Message Text" operation of the Telegram node allows users to modify the text content of an existing message in a chat or an inline message. This is useful when you want to update information dynamically without sending a new message, such as correcting typos, updating status messages, or changing instructions after user interaction.
Common scenarios include:
- Updating a bot's response message based on user input.
- Correcting or refining information in a previously sent message.
- Changing inline message content in interactive bots.
For example, if a bot sends a message with options and later needs to update the text to reflect a new state or additional details, this operation can be used to edit that message directly.
Properties
| Name | Meaning |
|---|---|
| Message Type | The type of the message to edit. Options: Inline Message (an inline message identified by Inline Message ID), or Message (a regular chat message identified by Chat ID and Message ID). |
| Chat ID | Unique identifier for the target chat or username of the target channel (format: @channelusername). Required if editing a regular message. |
| Message ID | Unique identifier of the message to edit. Required if editing a regular message. |
| Inline Message ID | Unique identifier of the inline message to edit. Required if editing an inline message. |
| Reply Markup | Additional interface options for the message. Options: None (no extra interface), Inline Keyboard (adds an inline keyboard next to the message). |
| Text | The new text content of the message to be sent. Required. |
| Parse Mode | How to parse the text formatting. Options: Markdown (Legacy), MarkdownV2, HTML. Default is HTML. |
| Disable WebPage Preview | Whether to disable link previews for links in the message. Boolean. |
| Additional Fields | Extra optional parameters to customize the message further, such as reply markup details (e.g., force reply, inline keyboard buttons). |
Reply Markup Details (if selected)
- Force Reply: Shows a reply interface to the user as if they manually tapped 'Reply'. Can be selective to specific users.
- Inline Keyboard: Adds an inline keyboard with customizable rows and buttons. Buttons can have text labels and additional fields like callback data, URLs, payment buttons, or inline query switches.
Output
The node outputs JSON data representing the result returned by the Telegram API after editing the message text. This typically includes confirmation of the edited message and its updated content.
No binary data output is involved in this operation.
Dependencies
- Requires a valid Telegram Bot API authentication token configured in n8n credentials.
- Relies on Telegram's Bot API endpoint for editing messages.
- No external services beyond Telegram are required.
Troubleshooting
- Missing Required Parameters: Ensure that for
Messagetype, bothChat IDandMessage IDare provided; forInline Messagetype,Inline Message IDmust be set. - Invalid Message Identifiers: Errors may occur if the message IDs do not exist or belong to another bot/user.
- Parse Mode Errors: Using incorrect syntax in Markdown or HTML can cause parsing errors. Validate formatting according to Telegram's documentation.
- Permission Issues: The bot must have permission to edit messages in the target chat/channel.
- API Rate Limits: Frequent edits might hit Telegram API limits; handle errors gracefully and consider retry logic.