Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node integrates with Telegram via the TelePilot API, enabling automation of various Telegram chat-related actions. Specifically, the Delete Chat operation allows users to delete a chat by specifying its unique chat ID. This is useful for managing and cleaning up chats programmatically within workflows, such as removing obsolete or unwanted conversations automatically.

Practical examples include:

  • Automatically deleting chats after processing their messages.
  • Cleaning up group or private chats based on certain triggers.
  • Managing chat lifecycle in customer support or notification systems.

Properties

Name Meaning
Chat ID The unique identifier of the chat to be deleted. This is a required string input. Example: "122323"

Output

The output is a JSON array containing the response from the Telegram API after attempting to delete the specified chat. The exact structure depends on the Telegram API's response but typically includes confirmation of deletion or error details.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram API authentication credential (an API key/token) configured in n8n.
  • Depends on the TelePilotNodeConnectionManager to manage Telegram client sessions.
  • The Telegram account must be logged in and authorized; otherwise, the node will throw errors prompting re-login.
  • Network access to Telegram servers is necessary.

Troubleshooting

  • Error: "Session was closed or terminated. Please login again"
    This indicates that the Telegram client session has expired or been closed. Resolve by re-authenticating using the login process described at https://telepilot.co/login-howto.

  • Error: "Please login"
    The node cannot perform operations without a valid Telegram session. Use the login flow with phone number and code before running this operation.

  • Invalid Chat ID or Chat Not Found
    If the provided Chat ID does not exist or is invalid, the Telegram API may return an error. Verify the Chat ID is correct.

  • Network Issues
    Ensure stable internet connectivity to reach Telegram servers.

Links and References

Discussion