Actions12
Overview
This node enables interaction with the Telegram Client API, allowing users to perform various chat-related operations programmatically. Specifically, the "Leave Chat" operation lets a user or bot leave a specified Telegram chat or channel. This is useful in scenarios where automated workflows need to manage group memberships, such as leaving inactive groups, managing subscriptions, or cleaning up after certain events.
Practical example: Automatically leaving a Telegram channel after processing its messages or when a certain condition in your workflow is met.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the chat or channel to leave. Can be a numeric ID (e.g., -100xxxx) or username (e.g., @username). |
Note: For the "Leave Chat" operation, only the "Chat ID" property is required and relevant.
Output
The output JSON object for the "Leave Chat" operation contains:
success(boolean): Indicates if the operation was successful.left(boolean): Confirms that the client has left the chat (true).chatId(string): The ID of the chat that was left.
Example output:
{
"success": true,
"left": true,
"chatId": "@examplechannel"
}
No binary data is produced by this operation.
Dependencies
- Requires an active Telegram Client API credential with valid session, API ID, and API hash.
- The node uses the Telegram Client SDK internally to connect and perform actions.
- Network connectivity to Telegram servers is necessary.
- No additional environment variables are required beyond the configured credentials.
Troubleshooting
Common issues:
- Missing or invalid credentials will cause authentication failure.
- Incorrect or non-existent Chat ID may result in errors or inability to leave the chat.
- Network issues can prevent connection to Telegram servers.
Error messages:
"No credentials provided": Ensure the Telegram Client API credentials are properly set up."Authentication failed: ...": Check that the session, API ID, and API hash are correct and valid."Operation "leaveChat" is not supported": This should not occur if the operation is correctly selected; verify node configuration.- Other errors from Telegram API (e.g., insufficient permissions to leave a chat) will be reported; ensure the client has rights to leave the specified chat.
Resolution tips:
- Verify credentials and re-authenticate if needed.
- Confirm the Chat ID is accurate and accessible by the client.
- Check network connectivity.
- Enable "Continue on Fail" option in the node to handle errors gracefully in workflows.