Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The "Create New Secret Chat" operation in the "User" resource of this custom n8n node allows you to initiate a new secret (end-to-end encrypted) chat with a specified Telegram user. This is useful for scenarios where privacy and security are paramount, such as exchanging sensitive information or confidential messages that should not be accessible by third parties or even Telegram servers.

Practical examples:

  • Automating the creation of secure communication channels with clients or team members.
  • Setting up workflows that require private, encrypted messaging for compliance or confidentiality reasons.

Properties

Display Name Type Description
User ID String ID of chat. The unique identifier of the Telegram user with whom you want to create a new secret chat. This field is required.

Output

The output will be a JSON object representing the result of the createNewSecretChat Telegram API call. The structure typically includes details about the newly created secret chat, such as:

{
  "_": "secretChat",
  "id": <number>,
  "user_id": <number>,
  "state": <string>,
  "isOutbound": <boolean>,
  ...
}
  • id: Unique identifier for the secret chat.
  • user_id: The Telegram user ID involved in the secret chat.
  • state: Current state of the secret chat (e.g., pending, ready).
  • isOutbound: Indicates if the chat was initiated by the current user.
  • Additional fields may be present depending on the Telegram API response.

Dependencies

  • Telegram Account: You must have valid Telegram credentials configured in n8n (API ID, API Hash, and phone number).
  • External Service: Requires access to the Telegram API via the TelePilot integration.
  • n8n Credentials: The node requires a credential named telePilotApi to be set up in your n8n instance.

Troubleshooting

Common Issues:

  • Not Logged In: If your Telegram account is not logged in, the node will throw an error instructing you to log in using the provided guide.
  • Invalid User ID: Providing an incorrect or non-existent User ID will result in an error from the Telegram API.
  • Session Closed: If the session has expired or been closed, you'll receive an error message prompting you to log in again.
  • Unauthorized: If your credentials are invalid or expired, you'll be asked to re-authenticate.

Error Messages and Resolutions:

  • "Please login: https://telepilot.co/login-howto"
    Resolution: Follow the link to log in your Telegram account through the node.
  • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
    Resolution: Re-authenticate your Telegram account in n8n.
  • Telegram API errors (e.g., invalid user, permission denied) will be returned directly in the output JSON. Check the error or errorType fields for more details.

Links and References


This summary provides all relevant information for using the "Create New Secret Chat" operation within the "User" resource of the TelePilot n8n node.

Discussion