Actions72
- Messages Actions
- Bots Actions
- Updates Actions
- Chats Actions
- Get Chat
- Get Chat Administrators
- Get Chat Member
- Get Chat Member Count
- Leave Chat
- Set Chat Title
- Set Chat Description
- Set Chat Photo
- Delete Chat Photo
- Set Chat Permissions
- Export Chat Invite Link
- Create Chat Invite Link
- Edit Chat Invite Link
- Revoke Chat Invite Link
- Approve Chat Join Request
- Decline Chat Join Request
- Set Chat Administrator Custom Title
- Ban Chat Member
- Unban Chat Member
- Restrict Chat Member
- Promote Chat Member
- Set Chat Sticker Set
- Delete Chat Sticker Set
- Pin Chat Message
- Unpin Chat Message
- Unpin All Chat Messages
- Files Actions
- Inline Queries Actions
- Callback Queries Actions
Overview
The node "N8N Tools Telegram" enables interaction with the Telegram Bot API, allowing users to perform various operations related to Telegram messages, chats, bots, files, inline queries, callback queries, and updates. Specifically for the Messages resource and the Edit Message Text operation, this node allows editing the text content of an existing message in a Telegram chat.
This is useful in scenarios where you want to update or correct the content of a previously sent message without sending a new one. For example, you might want to fix a typo, update information dynamically, or change the message based on user interactions or external events.
Practical example:
- A bot sends a status update message to a chat and later edits that message to reflect new status information.
- Correcting or updating instructions sent earlier in a chat without cluttering the conversation with new messages.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier for the target Telegram chat where the message exists. |
| Message ID | The unique identifier of the message to be edited within the specified chat. |
| Message Data | JSON object containing the new text and any additional parameters for editing the message. |
Details on "Message Data"
- This property expects a JSON string representing the data required by the Telegram API's
editMessageTextmethod. - It typically includes fields such as
text(the new message text),parse_mode(e.g., Markdown or HTML formatting), and optional parameters likedisable_web_page_preview.
Output
- The output is a JSON object representing the response from the Telegram API after editing the message.
- This usually contains the updated message object with details such as message ID, chat info, date, and the new text content.
- The node does not output binary data for this operation.
Dependencies
- Requires an active Telegram Bot API token configured as credentials in n8n.
- Requires a valid subscription and API key for the "N8N Tools API" service, which validates usage before forwarding requests to Telegram.
- The node uses HTTP requests to communicate with both the N8N Tools API and the Telegram Bot API endpoints.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that your API key credential for the N8N Tools API is correct and active.
- Unknown operation error: Ensure the operation parameter is set exactly to "editMessageText" when editing message text.
- Malformed JSON in Message Data: The
messageDataproperty must be a valid JSON string. Invalid JSON will cause parsing errors. - Message or Chat not found: If the specified chat ID or message ID does not exist or the bot lacks permission, the Telegram API will return an error.
- Permission issues: The bot must have rights to edit messages in the target chat.