Actions72
- Messages Actions
- Bots Actions
- Updates Actions
- Chats Actions
- Get Chat
- Get Chat Administrators
- Get Chat Member
- Get Chat Member Count
- Leave Chat
- Set Chat Title
- Set Chat Description
- Set Chat Photo
- Delete Chat Photo
- Set Chat Permissions
- Export Chat Invite Link
- Create Chat Invite Link
- Edit Chat Invite Link
- Revoke Chat Invite Link
- Approve Chat Join Request
- Decline Chat Join Request
- Set Chat Administrator Custom Title
- Ban Chat Member
- Unban Chat Member
- Restrict Chat Member
- Promote Chat Member
- Set Chat Sticker Set
- Delete Chat Sticker Set
- Pin Chat Message
- Unpin Chat Message
- Unpin All Chat Messages
- Files Actions
- Inline Queries Actions
- Callback Queries Actions
Overview
This node integrates with the Telegram Bot API to perform various bot-related operations. Specifically, for the "Bots" resource and the "Set My Default Administrator Rights" operation, it allows you to configure the default administrator rights that your Telegram bot will have in groups or channels where it is an administrator. This can be useful for automating the management of bot permissions across multiple chats without manually setting them each time.
Practical examples include:
- Automatically setting default admin rights when deploying a new bot.
- Updating the bot's permissions to restrict or expand its capabilities in group chats.
- Ensuring consistent permission settings across all channels managed by the bot.
Properties
| Name | Meaning |
|---|---|
| Options | Additional options as a JSON object. For this operation, it may include a boolean for_channels indicating if the rights apply to channels. |
Note: The node expects a property named rights (not listed in the provided properties but used in code) which should be a JSON string representing the administrator rights to set.
Output
The output is a JSON object representing the response from the Telegram Bot API after setting the default administrator rights. This typically includes confirmation of the updated rights or error details if the operation failed.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for the "N8N Tools API" service to validate subscription and access.
- Requires Telegram Bot API credentials (an API token for the Telegram bot).
- The node uses an internal helper class to interact with Telegram's API endpoints.
- Network access to Telegram's API and the N8N Tools API endpoint is necessary.
Troubleshooting
- Invalid subscription or API key: If the node throws an error about invalid subscription or API key, verify that the API key credential for the external validation service is correct and active.
- Malformed rights JSON: The
rightsparameter must be a valid JSON string representing the administrator rights. Invalid JSON will cause parsing errors. - Permission errors from Telegram: If the bot lacks sufficient privileges or the rights are not applicable, Telegram API may return errors. Ensure the bot is an administrator in the target chats.
- Network issues: Connectivity problems to Telegram or the validation API will cause request failures.
Links and References
- Telegram Bot API Documentation - setMyDefaultAdministratorRights
- Telegram Bots Introduction
- n8n Documentation
If you need details on other operations or resources, please provide their names.