Actions12
Overview
This node integrates with the Telegram Client API to perform various chat-related operations. Specifically, the "Get Message History" operation retrieves the message history from a specified Telegram chat or channel. This is useful for scenarios where you want to analyze past conversations, archive messages, or trigger workflows based on historical chat data.
Practical examples include:
- Fetching recent messages from a support channel to analyze customer queries.
- Archiving chat history for compliance or record-keeping.
- Triggering automated responses or analytics based on past messages in a group.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the chat or channel from which to retrieve message history. Can be a username (e.g., @username) or a numeric ID (e.g., -100xxxx). |
| Options | Additional optional parameters: - Silent: Not applicable for this operation. - Caption: Not applicable. - Parse Mode: Not applicable. - Limit: Maximum number of messages to return (default is 100). |
Output
The output JSON contains the following structure:
{
"success": true,
"messages": [
{
// Each message object as returned by the Telegram client library
}
]
}
success: Boolean indicating if the operation was successful.messages: An array of message objects representing the retrieved message history from the specified chat. Each message includes details such as message ID, date, sender, content, and other metadata as provided by the Telegram API.
No binary data is output by this operation.
Dependencies
- Requires an API key credential with Telegram API credentials (
apiIdandapiHash). - Uses the Telegram Client API via a Telegram client library bundled with the node.
- Requires network connectivity to Telegram servers.
- The node configuration must include valid Telegram API credentials.
Troubleshooting
Common Issues:
- Missing or invalid Telegram API credentials will cause authentication failures.
- Incorrect
Chat IDformat may result in errors or empty results. - Network issues can prevent connection to Telegram servers.
- Requesting too many messages (exceeding Telegram limits) might cause errors or partial results.
Error Messages:
"No credentials provided": Ensure that valid Telegram API credentials are configured."Operation \"getMessageHistory\" is not supported": Indicates an internal error; verify the operation parameter is correctly set.- Authentication failures typically indicate invalid or expired API credentials.
- Connection errors suggest network problems or Telegram service unavailability.
Resolution Tips:
- Double-check the API credentials and ensure they have the necessary permissions.
- Verify the
Chat IDis correct and accessible by the authenticated user. - Use reasonable limits for message retrieval to avoid rate limiting.
- Enable "Continue On Fail" option to handle individual item errors gracefully.