Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The Add Chat Members operation for the Chat resource in this custom n8n node allows you to add multiple users to a Telegram Supergroup or Channel by specifying their user IDs. This is useful for automating group management tasks, such as onboarding new members, migrating users between groups, or managing access to channels programmatically.

Practical examples:

  • Automatically adding new employees to a company announcement channel.
  • Migrating users from one group to another during organizational changes.
  • Batch-inviting users to event-specific Telegram groups.

Properties

Display Name Type Description
Chat ID String The unique identifier of the chat (Supergroup or Channel) where members will be added.
User IDs String Comma-separated list of user IDs to be added to the specified chat.

Output

The output is a JSON object representing the result of the addChatMembers operation as returned by the Telegram API. The structure typically includes:

{
  "_": "addChatMembers",
  "chat_id": "<provided_chat_id>",
  "user_ids": ["<user_id_1>", "<user_id_2>", "..."],
  // ...other fields as returned by the Telegram API
}
  • The exact fields may vary depending on the Telegram API response.
  • If the operation fails, an error message may be included in the output.

Dependencies

  • External Service: Requires access to the Telegram API via the TelePilot integration.
  • Credentials: You must configure and provide valid telePilotApi credentials in n8n (API ID, API Hash, and Phone Number).
  • n8n Configuration: Ensure the node is properly authenticated and that the session is active.

Troubleshooting

Common Issues:

  • Invalid Chat ID or User IDs: If the provided chat ID or user IDs are incorrect or do not exist, the operation will fail.
  • Insufficient Permissions: The bot/user must have permission to add members to the target chat.
  • Session Not Logged In: If the session is not authenticated, you may receive errors prompting you to log in again.

Error Messages & Resolutions:

  • "Please login: https://telepilot.co/login-howto"
    Resolution: Re-authenticate your TelePilot credentials using the login instructions.
  • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
    Resolution: Restart the authentication process for your session.
  • Telegram API errors (e.g., "USER_ID_INVALID", "CHAT_WRITE_FORBIDDEN")
    Resolution: Check that the user IDs and chat ID are correct and that you have the necessary permissions.

Links and References


Discussion