Actions12
Overview
This node integrates with the Telegram Client API to perform various messaging and chat-related operations. Specifically, the "Get User Info" operation retrieves detailed information about a Telegram user by their user ID or username. This is useful for scenarios where you need to fetch profile details of a user, such as their display name, username, or other metadata, without sending messages or interacting directly in chats.
Practical examples include:
- Fetching user details to personalize messages or logs.
- Verifying user identity before performing actions.
- Gathering user data for analytics or reporting within Telegram-based workflows.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier or username of the Telegram user whose information you want to get. |
| Options | Additional optional parameters: |
| - Silent: Send message silently without notification (not applicable for this operation). | |
| - Caption: Caption for media messages (not applicable here). | |
| - Parse Mode: How to parse message text (none, markdown, html) (not applicable here). | |
| - Limit: Maximum number of items to return (not applicable here). |
Note: For the "Get User Info" operation, only the User ID property is required and used. The options collection is available generally but does not affect this operation.
Output
The output JSON object contains:
success: A boolean indicating if the operation was successful (true).user: An object representing the Telegram user entity retrieved. This includes all available user information as returned by the Telegram Client API, such as username, first name, last name, user ID, and possibly more detailed profile data depending on the Telegram API response.
Example output structure:
{
"success": true,
"user": {
"id": 123456789,
"username": "exampleuser",
"firstName": "John",
"lastName": "Doe",
// ...additional user properties
}
}
No binary data is output 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 interact with the Telegram API.
- Network connectivity to Telegram servers is necessary.
- No additional environment variables are required beyond the provided credentials.
Troubleshooting
- No credentials provided: The node will throw an error if the Telegram Client API credentials are missing or invalid. Ensure that the API ID, API hash, and session string are correctly configured.
- Authentication failed: If the connection to Telegram fails due to invalid credentials or network issues, an authentication error will be thrown.
- Invalid User ID: Providing a non-existent or malformed user ID/username may result in errors or empty responses.
- Operation not supported: If the operation parameter is incorrectly set, the node will throw an unsupported operation error.
- Connection issues: Temporary network failures can cause connection errors; retrying or checking network status may help.
- The node supports "Continue On Fail" mode to allow workflows to proceed even if some executions fail, returning error details in the output JSON.
Links and References
- Telegram Client API Documentation
- Telegram Bot API Overview (for general context)
- n8n Documentation on Credentials