Actions28
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
The Join Chat operation of the Chat resource in the Telegram CoPilot (TelePilot) n8n node allows you to programmatically join a specific Telegram chat by providing its unique Chat ID. This is useful for automating workflows where your bot or integration needs to become a member of a group, channel, or supergroup before performing further actions such as sending messages, retrieving chat history, or managing members.
Common scenarios:
- Automatically joining new groups or channels as part of onboarding flows.
- Ensuring your automation has access to a chat before attempting to interact with it.
- Integrating with other systems that dynamically determine which chats to join.
Example use case:
A workflow that monitors a database for new group invitations and automatically joins those groups using their Chat IDs.
Properties
Display Name | Type | Description |
---|---|---|
Chat ID | String | ID of chat. The unique identifier of the chat you want the bot/integration to join. Required. Example: "122323" |
Output
The output will be a JSON object representing the result of the join operation. The structure typically includes details about the joined chat, such as its ID, type, title, and other metadata provided by the Telegram API.
Example output:
{
"id": 123456789,
"type": "supergroup",
"title": "My Group",
"username": "mygroup",
"photo": { /* ... */ },
"permissions": { /* ... */ },
// ...other Telegram chat fields
}
If the operation fails, the output may contain an error message or status indicating the failure.
Dependencies
- External Service: Requires access to the Telegram API via the TelePilot backend.
- 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:
- Invalid Chat ID: If the provided Chat ID does not exist or is incorrect, the operation will fail.
- Insufficient Permissions: The account used may not have permission to join certain chats (e.g., private groups or channels requiring approval).
- Session Not Authenticated: If the session is not logged in, you may receive errors instructing you to log in first.
- Session Closed: If you see an error like "Session was closed or terminated," re-authenticate using the login flow.
Error messages and resolutions:
"Please login: https://telepilot.co/login-howto"
Resolution: Use the login operation or follow the guide to authenticate your session."Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
Resolution: Re-login as above.- Telegram API errors (e.g., "CHAT_WRITE_FORBIDDEN", "USER_RESTRICTION")
Resolution: Check permissions and ensure the account can join the target chat.