Actions33
- Chat Actions
- Custom Request Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
The node provides integration with Telegram via the TelePilot API, enabling automation and interaction with Telegram chats, messages, users, groups, contacts, and files. Specifically, for the Chat resource and Get Chat History operation, it fetches a sequence of messages from a specified chat starting from a given message ID.
This node is beneficial in scenarios such as:
- Archiving or analyzing chat conversations.
- Monitoring chat activity for specific keywords or events.
- Building bots that respond based on chat history context.
- Synchronizing Telegram chat data with other systems.
Example: Retrieve the last 50 messages from a customer support group chat to analyze recent issues reported by users.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the chat from which to retrieve the message history. |
| From Message ID | The message ID to start fetching history from; use 0 to start from the latest message. |
| Limit | Maximum number of messages to return (up to 100). |
Output
The output is an array of JSON objects representing the chat history response from the Telegram API. Each object contains detailed information about messages retrieved, including message content, sender info, timestamps, and metadata.
The structure corresponds directly to the Telegram API's getChatHistory response, typically including fields like:
messages: Array of message objects.total_count: Total number of messages available.- Other metadata related to the chat history request.
No binary data output is associated with this operation.
Dependencies
- Requires an active Telegram API credential with appropriate permissions.
- Depends on the TelePilot Node Connection Manager to handle client sessions and API calls.
- The node expects the Telegram session to be logged in; otherwise, it will prompt for login using phone number authentication.
- No additional external services are required beyond Telegram API access.
Troubleshooting
- Not Logged In Error: If the Telegram session is not authenticated, the node throws an error instructing to log in via the login flow (e.g., using the ChatTrigger node with login commands).
- Limit Exceeded: Requesting more than 100 messages at once may result in errors or truncated results; keep the limit ≤ 100.
- Invalid Chat ID: Providing an incorrect or inaccessible chat ID will cause the API call to fail.
- Session Closed: If the client session was closed or terminated, the node suggests re-authentication.
- API Errors: Various Telegram API errors (e.g., unauthorized, forbidden) are caught and surfaced with descriptive messages.
To resolve common issues:
- Ensure valid and active Telegram credentials.
- Use the login commands provided by the node to authenticate.
- Verify chat IDs and parameters before execution.
- Handle errors gracefully by enabling "Continue On Fail" if partial success is acceptable.
Links and References
- Telegram Bot API Documentation (for general understanding of chat history)
- TelePilot Login Guide (for authentication setup)
- TelePilot Official Website