Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The node "Telegram CoPilot" provides a comprehensive interface to interact with Telegram via its API, enabling automation of various Telegram operations. Specifically, the Chat - Close Chat operation allows users to programmatically close a chat session in Telegram. This can be useful for managing active chats, cleaning up sessions, or automating workflows that require closing chats after certain interactions.

Common scenarios include:

  • Automatically closing chats after processing messages.
  • Managing chat lifecycle in customer support bots.
  • Automating cleanup of inactive or completed chat sessions.

Example: After a chatbot finishes interacting with a user, it can invoke the Close Chat operation to close the chat window or session on the Telegram client side.

Properties

Name Meaning
Chat ID The unique identifier of the chat to be closed. This is required to specify which chat session should be closed. Example: "122323".

Output

The output of the Close Chat operation is the JSON response returned by the Telegram API after attempting to close the specified chat. It typically contains confirmation details about the chat closure or any error information if the operation failed.

The json output field will contain this response object directly.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram API authentication credential (an API key and associated login).
  • Depends on the TelePilotNodeConnectionManager service to manage Telegram client sessions.
  • The node expects the Telegram account to be logged in and connected; otherwise, it will throw errors prompting login.
  • No additional external services are needed beyond Telegram's API.

Troubleshooting

  • Error: "Please login"
    Occurs if the Telegram session is not authenticated or has expired. Resolve by performing the login process using the appropriate login operation or node.

  • Error: "Session was closed or terminated"
    Indicates the Telegram client session was closed unexpectedly. Re-login is required.

  • Unauthorized errors
    May happen if the API credentials are invalid or expired. Verify the API key and login status.

  • Invalid Chat ID
    If the provided Chat ID does not exist or is incorrect, the Telegram API may return an error. Double-check the Chat ID value.

  • To handle failures gracefully, enable the node's "Continue On Fail" option to prevent workflow interruption.

Links and References

Discussion