Actions26
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
The node provides integration with Telegram via the TelePilot API, enabling automation of various Telegram chat-related actions. Specifically, for the Chat resource and the Close Chat operation, the node closes an open chat session identified by a given chat ID. This can be useful in scenarios where you want to programmatically manage chat sessions, such as closing inactive chats or cleaning up after automated workflows.
Practical examples include:
- Automatically closing a chat after a customer support conversation ends.
- Managing chat lifecycle in group or channel management bots.
- Closing chats to reduce clutter or reset chat states in automation flows.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the chat to close. This is a required string input. |
Output
The output is a JSON array containing the response from the TelePilot API after attempting to close the specified chat. The structure typically includes details about the closed chat or confirmation of the action. The exact fields depend on the TelePilot API response but generally confirm success or provide error information.
No binary data output is involved in this operation.
Example output snippet (conceptual):
[
{
"chat_id": "123456789",
"status": "closed",
"message": "Chat successfully closed"
}
]
Dependencies
- Requires an active connection to the TelePilot API using valid credentials (an API key credential).
- The node depends on the TelePilotNodeConnectionManager to manage client sessions and invoke Telegram API methods.
- Proper login/authentication must be established before performing operations; otherwise, errors will occur.
- No additional environment variables are explicitly required beyond the API credentials.
Troubleshooting
Common issues:
- Attempting to close a chat without being logged in will result in an error prompting re-login.
- Using an invalid or expired chat ID may cause the operation to fail.
- If the client session was closed or terminated unexpectedly, the node will throw an error instructing to log in again.
Error messages and resolutions:
"Session was closed or terminated. Please login again": Indicates the Telegram client session is no longer valid. Resolve by re-authenticating using the login flow."Please login": The node detected no active session. Use the login operation to authenticate before retrying."Unauthorized": Credentials are invalid or expired. Re-enter valid API credentials.
Links and References
- TelePilot Login Guide — Instructions for authenticating and managing Telegram sessions.
- Telegram Bot API Documentation — General reference for Telegram API capabilities (note: TelePilot uses TDLib under the hood, which differs slightly).