Actions26
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
This node, named "Telegram CoPilot," integrates with the Telegram API to perform various Telegram-related actions programmatically. Specifically, for the User resource and the Create Private Chat operation, it allows creating a private chat with a specified user by their user ID. This is useful in scenarios where you want to initiate or ensure a private conversation exists between the authenticated Telegram account and another user.
Practical examples include:
- Automatically starting a private chat with a new contact.
- Forcing creation of a private chat before sending messages or media.
- Managing Telegram interactions within automated workflows, such as customer support bots or notification systems.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Telegram user with whom to create the private chat. |
| Force | Boolean flag indicating whether to force the creation of the private chat even if one exists. |
Output
The output is a JSON array containing the response from the Telegram API after attempting to create the private chat. The structure typically includes details about the created chat object, such as chat identifiers and metadata confirming the chat's creation.
No binary data output is produced by this operation.
Dependencies
- Requires an active Telegram API authentication credential (an API key/token) configured in n8n.
- Depends on the internal connection manager to handle Telegram client sessions.
- Requires the Telegram account to be logged in via the node’s login mechanism before performing operations.
Troubleshooting
- Session Not Logged In: If the Telegram session is not logged in, the node will throw an error prompting to log in first. Use the login operation with phone number and code to authenticate.
- Closed Client Error: If the client session was closed or terminated, the node suggests re-authenticating.
- Unauthorized Errors: These indicate invalid or expired credentials; re-login is required.
- Invalid User ID: Providing an incorrect or non-existent user ID may cause the operation to fail or return errors from Telegram.
- Force Flag Usage: If
forceis false and a private chat already exists, the node might not create a new chat but reuse the existing one.
Links and References
- Telegram API Documentation
- Telepilot Login Guide (for authentication setup and troubleshooting)