Actions27
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
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, such as removing obsolete or unwanted conversations in bulk or as part of workflow automations.
Practical examples include:
- Automatically deleting chats after processing their messages.
- Cleaning up group or private chats that are no longer needed.
- 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 result of the delete chat operation. The structure corresponds to the response from the TelePilot API's deleteChat
method, which typically includes confirmation of deletion or error details if the operation failed.
No binary data output is produced by this operation.
Example output snippet (conceptual):
[
{
"_:": "ok"
}
]
or an error object if deletion fails.
Dependencies
- Requires an active Telegram API session authenticated via an API key credential configured in n8n.
- Depends on the TelePilotNodeConnectionManager to manage Telegram client sessions.
- The user must be logged in with valid Telegram credentials; otherwise, the node will throw errors prompting re-login.
- No additional external services beyond Telegram API accessed through TelePilot.
Troubleshooting
Common issues:
- Attempting to delete a chat without being logged in will cause an error instructing to log in first.
- Using an invalid or non-existent chat ID will likely result in an error from the Telegram API.
- Session expiration or closure requires re-authentication; the node will prompt to login again.
Error messages:
"Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
: Indicates the Telegram session is no longer valid; re-login is necessary."Please login: https://telepilot.co/login-howto"
: The node detected unauthorized access due to missing or expired credentials.- Errors related to invalid chat IDs or permissions will come directly from the Telegram API and should be handled accordingly.
Links and References
- TelePilot Login Guide — Instructions for setting up and logging into Telegram via TelePilot.
- Telegram API Documentation — Official Telegram API reference for understanding chat operations.