Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The node "Telegram CoPilot" enables interaction with the Telegram API to perform various chat and message-related operations. Specifically, for the Message resource and Edit Message Text operation, it allows editing the text content of an existing message in a specified chat.

This node is beneficial when you want to programmatically update or correct messages that have already been sent in Telegram chats. For example, you might use it to fix typos, update information, or dynamically change message content based on external triggers or workflows.

Practical example:

  • After sending a notification message, you realize some details need updating; this node can edit the original message text without sending a new message.
  • In a chatbot scenario, you can update previous bot responses to reflect new data or user input.

Properties

Name Meaning
Chat ID The unique identifier of the chat where the message to be edited exists.
Message ID The unique identifier of the message within the chat that you want to edit.
Message Text The new text content that will replace the current text of the specified message.

Output

The output is a JSON object representing the result of the edit operation as returned by the Telegram API. It typically includes updated message details such as message ID, chat info, and the new text content.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Telegram API.
  • Depends on the internal Telegram client session management handled by the node's connection manager.
  • No additional external services are required beyond Telegram itself.

Troubleshooting

  • Common issues:

    • Attempting to edit a message in a chat where the bot/user does not have permission may fail.
    • Providing invalid or expired message IDs or chat IDs will cause errors.
    • If the Telegram session is not logged in or has expired, the node will throw an error prompting re-login.
  • Error messages and resolutions:

    • "Please login": Indicates the Telegram session is not authenticated. Resolve by performing the login procedure using the appropriate login nodes or commands.
    • "Session was closed or terminated. Please login again": The client session was closed unexpectedly; re-authenticate.
    • "CHAT_WRITE_FORBIDDEN": The bot/user cannot send or edit messages in the target chat. Check permissions.
    • General API errors include descriptive messages from Telegram; verify parameters and permissions accordingly.

Links and References

Discussion