Actions33
- Chat Actions
- Custom Request Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
The node integrates with Telegram via the TelePilot API, enabling automation of various Telegram messaging tasks. Specifically, for the Message resource and View Messages operation, it allows users to mark specified messages in a chat as viewed/read. This can be useful in scenarios where you want to programmatically acknowledge messages without manually opening the Telegram app or interface.
Practical examples include:
- Automatically marking messages as read after processing them in a workflow.
- Managing message read status in bulk for customer support chats.
- Synchronizing message states between Telegram and other systems.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the chat containing the messages to view. |
| Message IDs | Comma-separated list of message identifiers within the chat that should be marked as viewed. |
| Force Read | Boolean flag indicating whether to mark the messages as read even if the chat is currently closed. |
Output
The output JSON contains the response from the Telegram API after attempting to mark the specified messages as viewed. It typically includes confirmation details about the messages marked as read.
The structure corresponds to the Telegram API's viewMessages method response, which may include fields such as the count of messages marked as read or status indicators.
No binary data output is involved in this operation.
Dependencies
- Requires an active Telegram API authentication credential (an API key/token) configured in n8n.
- Depends on the TelePilot Node Connection Manager to handle client sessions and API calls.
- The node expects the Telegram session to be logged in and active; otherwise, it will prompt for login.
Troubleshooting
Common Issues:
- Attempting to view messages without a valid or active Telegram session will result in errors prompting re-login.
- Incorrect or malformed message IDs (e.g., non-numeric or improperly comma-separated) may cause the operation to fail.
- If the chat ID does not exist or the user lacks permission, the API call will fail.
Error Messages:
"Please login": Indicates the Telegram session is not authenticated. Resolve by performing the login operation using the appropriate node action."Session was closed or terminated": The client session has expired or been closed. Re-login is required."Unauthorized": The credentials are invalid or expired. Check and update the API authentication token.- Other Telegram API errors may be passed through; consult Telegram API documentation for specific error codes.
Links and References
- TelePilot Documentation — Guide for logging in and managing Telegram sessions.
- Telegram Bot API — Official Telegram API reference for viewing messages (note: TelePilot uses TDLib but concepts are similar).
- n8n Documentation — General information on creating and using custom nodes.