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, status, or other metadata about a user in Telegram.
Practical examples include:
- Fetching user details before sending a personalized message.
- Verifying user identity or status within a Telegram bot workflow.
- Gathering user data for analytics or logging purposes.
Properties
| Name | Meaning |
|---|---|
| User ID | The Telegram user ID or username whose information you want to retrieve. |
| Options | Additional optional parameters: |
| Silent | Send messages silently without notification (not applicable for Get User Info). |
| Caption | Caption for media messages (not applicable for Get User Info). |
| Parse Mode | How to parse message text: None, Markdown, or HTML (not applicable for Get User Info). |
| Limit | Maximum number of items to return (not applicable for Get User Info). |
Note: For the "Get User Info" operation, only the User ID property is required and used. The options collection is present but not utilized in this operation.
Output
The output JSON object contains:
success: Boolean indicating if the operation was successful.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, status, and other profile details.
Example output structure:
{
"success": true,
"user": {
// Telegram user entity fields, e.g.:
"id": 123456789,
"username": "exampleuser",
"firstName": "John",
"lastName": "Doe",
"status": { /* user status info */ },
// ...other user properties
}
}
No binary data is output by this operation.
Dependencies
- Requires an active Telegram Client API session authenticated via credentials containing API ID, API hash, and a valid session string.
- Uses the Telegram Client SDK internally to connect and interact with Telegram servers.
- The node requires configuration of these credentials in n8n prior to execution.
Troubleshooting
- Missing or invalid credentials: The node will throw an error if no credentials are provided or if the session string is missing/empty. Ensure that the Telegram API credentials and session are correctly configured.
- Invalid User ID or username: If the specified user does not exist or cannot be found, the Telegram Client API may throw an error. Verify the correctness of the User ID or username.
- Connection issues: Network problems or Telegram server issues can cause connection failures. The node attempts retries but persistent failures require checking network connectivity and Telegram service status.
- Unsupported operation error: If the operation parameter is set incorrectly, the node throws an error indicating the operation is not supported.
To resolve errors:
- Double-check credential setup and ensure the session is valid.
- Confirm the User ID or username exists on Telegram.
- Review network settings and retry later if Telegram services are down.