Telegram CoPilot icon

Telegram CoPilot

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

Actions56

效邪褌 → 袩芯谢褍褔懈褌褜 懈褋褌芯褉懈褞 褔邪褌邪

AI-generated

Overview

This node operation retrieves the chat history from a specified Telegram chat. It allows users to fetch messages starting from a particular message ID and limits the number of messages returned, up to a maximum of 100 messages per request. This is useful for scenarios where users want to analyze or archive chat conversations, monitor ongoing discussions, or integrate chat data into other workflows.

Use Case Examples

  1. Fetching the last 50 messages from a customer support chat to analyze common issues.
  2. Retrieving recent messages from a project group chat to summarize updates for a report.

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 fetching the chat history. If set to 0, it starts from the latest messages.
Limit The maximum number of messages to retrieve, with a cap of 100 messages per request.

Output

JSON

  • messages - An array of message objects retrieved from the chat history.
  • total_count - The total number of messages returned in the response.

Dependencies

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

Troubleshooting

  • Ensure the Telegram account is logged in and authenticated before attempting to fetch chat history; 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 limit parameter should not exceed 100; exceeding this may cause errors or truncated results.

Links

  • TelePilot Login Guide - Instructions on how to authenticate and log in to the Telegram API using TelePilot.

Discussion