Actions43
- Chat Actions
- Add Chat Members
- Close Chat
- Close Chat (Lite)
- Create SuperGroup or Channel
- Delete Chat
- Get Chat
- Get Chat History
- Get Chats
- Join Chat
- Mark Chat as Unread
- Open Chat
- Open Chat (Lite)
- Search Public Chat (by Username, Lite)
- Search Public Chat (by Username)
- Search Public Chats (Search in Username, Title)
- Send Chat Action
- Contact Actions
- Custom Request Actions
- File Actions
- Group Actions
- Login Actions
- Message Actions
- User Actions
Chat → Get Chat History
AI-generatedSummary
Fetches message history from a Telegram chat using TDLib getChatHistory. Sends a TDLib getChatHistory request with the specified Chat ID, From Message ID, and Limit. The node hardcodes offset to 0 and only_local to false. Set From Message ID to 0 to start from the last (most recent) message. The raw TDLib response is returned as a single output item. Requires an authenticated telePilot session.
Inputs
- Chat ID (required) — ID of the chat whose history should be fetched.
- From Message ID (required) — Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
- Limit (required) — Maximum number of messages to return; up to 100 messages can be retrieved at once. The value is passed through to TDLib as provided.
Output shape
TDLib getChatHistory result (for example, an object with a messages array)
The raw TDLib getChatHistory result object is returned as a single JSON output item.
Examples
Example 1: You want to fetch the last 50 messages from a specific Telegram chat, starting from a certain message, to analyze conversation context or save it to a database. You would set Chat ID to 122323, From Message ID to 100, and Limit to 50.
Get chat history of the channel with ID 122323, starting from message 100, with a limit of 50 messages.