Actions33
- Chat Actions
- Custom Request Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
This node, named "Telegram CoPilot," provides extensive integration with the Telegram API, enabling automation and interaction with Telegram user accounts, chats, messages, files, groups, contacts, and more. It acts as a personal assistant for Telegram by allowing users to perform various operations such as retrieving user information, sending messages (text, audio, video, photo, files), managing chats and groups, and handling authentication/login.
For the User - Get User operation specifically, the node fetches detailed information about a Telegram user by their user ID. This is useful in scenarios where you want to retrieve profile details or metadata of a specific Telegram user programmatically within an n8n workflow.
Practical examples:
- Fetching user details to personalize messages or automate responses.
- Retrieving user info for logging or analytics purposes.
- Integrating Telegram user data into CRM or other systems.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Telegram user whose information you want to retrieve. |
Output
The output is a JSON array containing the response from the Telegram API for the requested user. For the "Get User" operation, the JSON object includes detailed user information such as username, first name, last name, status, profile photos, and other metadata as returned by Telegram's API.
No binary data output is involved in this operation.
Example output structure (simplified):
{
"id": 123456789,
"first_name": "John",
"last_name": "Doe",
"username": "johndoe",
"status": { /* user status info */ },
"profile_photo": { /* photo info */ },
// ... other user fields
}
Dependencies
- Requires an API key credential for Telegram (referred generically as "an API key credential").
- Uses an internal connection manager to handle Telegram client sessions.
- Requires proper login/authentication via phone number and code before performing user-related operations.
- The node depends on the Telegram TDLib API through a client wrapper.
Troubleshooting
Common issues:
- Not logged in: The node requires a valid Telegram session. If not logged in, it will throw an error prompting to login using the ChatTrigger node or follow the login guide.
- Session closed or expired: If the Telegram client session is closed or invalidated, the node will ask to re-login.
- Invalid User ID: Providing an incorrect or non-existent user ID may result in errors or empty responses.
Error messages:
"Please login: https://telepilot.co/login-howto": Indicates that the Telegram account is not authenticated. Resolve by following the login procedure."A closed client cannot be reused, create a new Client": The session was terminated; re-authenticate."Unauthorized": Authentication failed; check credentials and login status.- Other Telegram API errors are passed through and may include reasons like user restrictions or invalid parameters.
Links and References
- Telegram TDLib Documentation
- Telepilot Login Guide
- Telegram Bot API Overview (for general Telegram API understanding)