Actions40
- Chat Actions
- Custom Request Actions
- Group Actions
- File Actions
- Login Actions
- Message Actions
- User Actions
- Contact Actions
Overview
This node interacts with the Telegram API to perform various chat-related operations. Specifically, the 'Get Chat History' operation fetches the message history from a specified chat starting from a given message ID, with a limit on the number of messages retrieved. This is useful for scenarios where users want to analyze past conversations, archive chat data, or monitor chat activity programmatically.
Use Case Examples
- Retrieve the last 100 messages from a specific Telegram chat for analysis.
- Fetch chat history starting from a particular message ID to continue processing messages incrementally.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the chat from which to fetch the message history. |
| From Message ID | The message ID from which to start fetching the chat history; use 0 to start from the latest message. |
| Limit | The maximum number of messages to retrieve in one request, up to 100. |
Output
JSON
messages- Array of messages retrieved from the chat history.total_count- Total number of messages available in the chat history (if provided).chat_id- The ID of the chat from which messages were fetched.
Dependencies
- Requires an API key credential for Telegram API access.
Troubleshooting
- Ensure the Telegram API credentials are correctly configured and the session is logged in; otherwise, the node will throw login-related errors.
- If the chat ID is invalid or the bot/user does not have access to the chat, the node may return errors or empty results.
- The 'Limit' parameter must be a number up to 100; exceeding this may cause errors or truncated results.
- Common error messages include 'Please login' indicating the need to authenticate via the login node or process, and 'Unauthorized' indicating permission issues.
Links
- Telegram Bot API - getChatHistory - Official Telegram API documentation for fetching chat history.
- TelePilot Login Guide - Instructions for logging in and authenticating the Telegram CoPilot node.