Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node integrates with Telegram via the TelePilot API, enabling automation of various Telegram user-related actions. Specifically for the User resource and the Create Private Chat operation, it allows creating a private chat with a specified Telegram user. This is useful when you want to programmatically initiate or ensure a private conversation exists between your Telegram bot/account and another user.

Common scenarios include:

  • Automatically starting a private chat with a user after some trigger event.
  • Forcing creation of a private chat even if one already exists (useful for resetting or refreshing chat state).
  • Integrating Telegram messaging workflows into broader automation pipelines.

Example: After receiving a new lead in a CRM, automatically create a private chat with that lead’s Telegram user ID to send personalized messages.

Properties

Name Meaning
User ID The Telegram user ID to create a private chat with.
Force Boolean flag indicating whether to force creation of the private chat even if it exists.

Output

The output is an array of JSON objects representing the result of the createPrivateChat invocation. The structure corresponds to the Telegram API response for creating a private chat, typically including details about the newly created chat such as chat ID, type, and participant information.

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 TelePilot Node Connection Manager internally managing Telegram client sessions.
  • The node expects the Telegram account to be logged in; otherwise, it will throw errors prompting login.
  • No external environment variables beyond the Telegram API credentials are required.

Troubleshooting

  • Error: "Please login"
    Occurs if the Telegram session is not authenticated. Resolve by using the login flow provided by the node or the related ChatTrigger node with login commands.

  • Session closed or terminated error
    Indicates the Telegram client session was closed unexpectedly. Re-login is required.

  • Unauthorized error
    Means the API credentials are invalid or expired. Check and refresh your Telegram API credentials.

  • Force flag misuse
    If forcing chat creation repeatedly causes unexpected behavior, verify if the chat already exists and whether forcing is necessary.

  • Invalid User ID
    Ensure the User ID is correct and corresponds to a valid Telegram user.

Links and References

Discussion