Telegram CoPilot icon

Telegram CoPilot

袙邪褕 锌械褉褋芯薪邪谢褜薪褘泄 Telegram CoPilot

Actions56

效邪褌 → 袩芯谢褍褔懈褌褜 锌谢邪褌薪褘械 锌芯褋褌褘 懈蟹 褔邪褌邪

AI-generated

Overview

This node operation retrieves the chat history from a specified chat in Telegram. It allows users to fetch a sequence of messages starting from a given message ID, with a limit on the number of messages returned. This is useful for scenarios where you want to analyze past conversations, archive chat data, or process messages for automation workflows.

Use Case Examples

  1. Fetch the last 100 messages from a specific chat to analyze user interactions.
  2. Retrieve chat history starting from a particular message ID to monitor ongoing conversations.

Properties

Name Meaning
Chat ID The unique identifier of the chat from which to retrieve the history.
From Message ID The message ID from which to start retrieving the chat history. Use 0 to start from the latest message.
Limit The maximum number of messages to retrieve, up to 100 messages at once.

Output

JSON

  • messages - Array of messages retrieved from the chat history.
  • total_count - Total number of messages retrieved.

Dependencies

  • Requires Telegram API credentials including API ID, API hash, and phone number for authentication.

Troubleshooting

  • Ensure the Telegram account is logged in and the session is active; otherwise, the node will throw a login error.
  • If the chat ID is invalid or the chat does not exist, the node will throw a 'Chat not found' error.
  • The 'From Message ID' should be a valid message ID; using an invalid ID may result in errors or empty results.
  • The 'Limit' should not exceed 100 to avoid API limitations.

Links

  • TelePilot Login Guide - Instructions on how to log in and authenticate the Telegram account for this node.

Discussion