Actions27
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
This node integrates with Telegram via the TelePilot API, enabling automation and interaction with Telegram chats, messages, users, groups, files, and login sessions. Specifically, for the Chat resource and Get Chat History operation, it fetches the message history of a specified chat starting from a given message ID.
Common scenarios include:
- Retrieving recent or historical messages from a Telegram chat for analysis or archiving.
- Building chatbots or monitoring tools that need to process past conversations.
- Synchronizing chat data with other systems or databases.
Example: Fetching the last message in a chat by specifying chat_id and setting from_message_id to 0 to start from the latest message.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the Telegram chat whose history you want to retrieve. |
| From Message ID | The message ID from which to start fetching history; use "0" to get messages starting from the latest one. |
Output
The output is a JSON array containing the result of the invoked Telegram API method getChatHistory. The structure includes details about the fetched messages such as message IDs, sender info, content, timestamps, and other metadata related to each message in the chat history.
No binary data output is indicated for this operation.
Dependencies
- Requires an active Telegram API credential (API ID, API Hash, phone number) configured in n8n.
- Depends on the TelePilot Node Connection Manager to handle Telegram client sessions and API calls.
- The node requires the user to be logged in to Telegram via the node's login mechanism before performing chat operations.
Troubleshooting
Error: "Session was closed or terminated. Please login again"
This indicates the Telegram client session has expired or been closed. Resolve by re-authenticating using the login flow provided by the node.Error: "Please login"
Occurs if the node attempts to perform actions without an active authenticated session. Use the login commands or nodes to authenticate first.Unexpected auth states or command errors during login
Follow the guide at https://telepilot.co/login-howto for proper login procedures including MFA support.Ensure the
chat_idandfrom_message_idare valid and correctly formatted strings to avoid invocation errors.
Links and References
- TelePilot Login Guide — Instructions for authenticating your Telegram account.
- Telegram API Documentation — Underlying API used by TelePilot.
- TelePilot Official Site — More information about the TelePilot project.