Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Chat → Get Chat History

AI-generated

Summary

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.

Links

Discussion