Chat → Get
AI-generatedOverview
This node interacts with Telegram chats using the GramJS library. Specifically, the Chat - Get operation retrieves detailed information about a specific Telegram chat by its ID, username, or phone number. This can be useful for obtaining metadata about a chat such as its type, title, participants count, and other properties.
Common scenarios include:
- Fetching chat details to display or log in an automation workflow.
- Using chat information to conditionally route messages or trigger further actions.
- Integrating Telegram chat data into CRM or support systems.
Example: You want to get the full details of a Telegram group chat by providing its username, then use that data to verify if the chat is active before sending messages.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier, username, or phone number of the Telegram chat to retrieve info from. |
| Additional Options | Collection of optional parameters (not used in this operation). |
Note: For the Chat - Get operation, only the "Chat ID" property is required and relevant.
Output
The output is a JSON object representing the Telegram chat entity retrieved via GramJS's getEntity method. It contains detailed information about the chat, which may include:
- Chat ID
- Title or name of the chat
- Type of chat (private, group, supergroup, channel)
- Participants count (if available)
- Other metadata fields depending on the chat type
The output structure directly reflects the Telegram API's chat entity format as returned by GramJS.
No binary data is produced by this operation.
Example output snippet (simplified):
{
"id": 123456789,
"title": "My Group Chat",
"type": "supergroup",
"participantsCount": 150,
...
}
Dependencies
Requires a valid Telegram API authentication setup using GramJS credentials, including:
- API ID
- API Hash
- Session string (for authentication)
- Phone number (used only if session string is not provided, but password and code auth are unsupported)
The node uses the
telegramandtelegram/sessionsnpm packages internally.No additional environment variables are needed beyond the configured Telegram API credentials.
Troubleshooting
Authentication errors: If the node throws errors related to authentication, ensure you have provided a valid session string credential. Password and phone code authentication are not supported in this node.
Invalid Chat ID: Providing an incorrect or non-existent chat ID/username will cause the node to fail fetching the chat entity. Verify the chat identifier is correct.
Network issues: Connectivity problems with Telegram servers can cause timeouts or failures. Check your network connection.
Permission errors: Some chats (e.g., private groups or channels) may restrict access. Ensure the authenticated user has permission to view the chat.
Error messages typically include the underlying error message from GramJS, e.g., "Authentication error", "No message found", or generic "Error: ...". Review these messages to diagnose issues.