Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node allows you to create a new Telegram Supergroup or Channel using the TelePilot integration in n8n. It is designed for automating the creation of group chats or broadcast channels on Telegram, which can be useful for community management, automated onboarding, or setting up announcement channels directly from your workflows.

Practical examples:

  • Automatically create a new discussion group for each new project or client.
  • Set up a channel for broadcasting updates when certain events occur in your business process.
  • Integrate with other systems to provision Telegram communities on demand.

Properties

The following input properties are supported for the "Create SuperGroup or Channel" operation under the "Chat" resource:

Display Name Type Description
Title String Title of the new chat or channel.
Description String Chat description; must be between 0-255 characters.
Is Channel? Boolean Whether to create a channel (true) or supergroup (false).

Output

The output will be a JSON object containing details about the newly created supergroup or channel. The structure typically includes:

{
  "_": "createNewSupergroupChat",
  "id": <number>,                // Unique identifier for the chat/channel
  "title": "<string>",           // Title as provided
  "description": "<string>",     // Description as provided
  "is_channel": <boolean>,       // True if a channel, false if a supergroup
  // ...other Telegram chat metadata fields
}

Additional fields may be present depending on the Telegram API response, such as permissions, status, and invite links.

Dependencies

  • External Service: Requires access to the Telegram API via the TelePilot integration.
  • Credentials: You must configure the telePilotApi credential in n8n, including your Telegram API ID, API Hash, and phone number.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Authentication Errors: If your session is not authenticated, you may receive errors prompting you to log in again. Ensure your TelePilot credentials are valid and that you have completed the login process.
  • Permission Denied: If the Telegram account does not have permission to create groups or channels, the operation will fail.
  • Invalid Input: Providing an empty title or a description longer than 255 characters will result in an error from the Telegram API.
  • Session Closed: If you see an error like "Session was closed or terminated," you need to re-authenticate via the login process.

Error Messages:

  • "Please login: https://telepilot.co/login-howto": Indicates authentication is required.
  • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto": Your session expired or was closed; re-login is necessary.
  • Telegram API errors related to invalid parameters will be returned in the output JSON.

Links and References

Discussion