Actions27
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
This node, named "Telegram CoPilot," provides a comprehensive interface to interact with Telegram via the TelePilot API. It supports multiple Telegram resources such as users, contacts, chats, messages, files, groups, and login sessions. The node enables sending and managing messages, retrieving chat history, managing chat members, handling files, and performing user-related operations.
The "Send Viseo" operation under the "Message" resource specifically allows sending video messages to a Telegram chat by providing a video URL and optional reply message ID.
Common scenarios where this node is beneficial:
- Automating Telegram messaging workflows, such as sending notifications or media content to specific chats.
- Managing Telegram chats and groups programmatically.
- Retrieving user or chat information for integration with other systems.
- Handling Telegram login sessions within n8n workflows.
Practical example:
- Automatically send a promotional video to a Telegram channel or group when a new product is launched.
- Forward important video messages from one chat to another.
- Edit or delete messages in bulk based on workflow conditions.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the Telegram chat where the message will be sent. |
| VideoUrl | The URL of the video file to send as a message (used in Send Viseo operation). |
| reply_to_msg_id | (Optional) The message ID to which the new message should be a reply. |
Note: Only "Chat ID" was provided explicitly in the input properties JSON. Other properties like VideoUrl and reply_to_msg_id are inferred from the code usage in the "sendMessageVideo" operation.
Output
The node outputs an array of JSON objects representing the response from the TelePilot API for the invoked operation.
For the "Send Viseo" (sendMessageVideo) operation, the output JSON contains the details of the sent video message, including metadata such as message ID, chat ID, and content description.
If the node handles binary data (e.g., downloading files), it would provide binary data fields accordingly, but for sending videos via URL, only JSON output is returned.
Dependencies
- Requires an API key credential for the TelePilot API to authenticate requests.
- Depends on the TelePilotNodeConnectionManager class to manage Telegram client sessions.
- Requires proper Telegram login session established via phone number authentication before executing most operations.
- The node uses the TelePilot API's TDLib-based client for Telegram interactions.
Troubleshooting
Session Not Logged In:
Error messages like "Please login" or "Session was closed or terminated" indicate that the Telegram session is not active. Users must perform login using the login operations (e.g.,/startcommand) before sending messages.Unauthorized Errors:
These occur if the API credentials are invalid or the session expired. Re-authenticate by logging in again.Invalid Chat ID or Message ID:
Operations requiring chat or message IDs will fail if these are incorrect or the bot/user does not have access. Verify IDs and permissions.Video URL Issues:
For sending videos, ensure the provided URL is accessible and valid. Invalid URLs may cause failures.Command Not Supported:
When using the login commands, unsupported commands will return help text. Use only supported commands like/start,/stop,/clear,/cred,/stat.
Links and References
- TelePilot Official Login Guide — Instructions for setting up Telegram login sessions.
- Telegram TDLib Documentation — Underlying library used by TelePilot.
- Telegram Bot API — General reference for Telegram messaging capabilities (note: TelePilot uses TDLib, which is more extensive).
If you need details about other operations or resources, please provide their names.