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 "Get My Default Administrator Rights" operation, it retrieves the default administrator rights that the bot has in chats or channels. This is useful for managing bot permissions programmatically, ensuring the bot has the correct administrative capabilities by default.
Common scenarios include:
- Automatically checking what admin rights a bot currently holds before performing actions that require certain permissions.
- Auditing or logging bot permissions across multiple chats or channels.
- Integrating with workflows that adjust bot behavior based on its admin rights.
Example: A workflow could use this node to fetch the bot's default admin rights and then decide whether to promote the bot or adjust settings accordingly.
Properties
| Name | Meaning |
|---|---|
| Options | Additional options as a JSON object. For this operation, it can include for_channels (boolean) to specify if the rights are for channels instead of groups/supergroups. |
Output
The output JSON contains the details of the bot's default administrator rights. This typically includes which permissions the bot has by default when added as an administrator in chats or channels. The exact structure follows Telegram's Bot API specification for default administrator rights, such as rights to change info, delete messages, ban users, invite users, pin messages, etc.
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 the external Telegram Bot API via HTTP requests wrapped in helper classes.
- The node expects proper configuration of these credentials within n8n.
Troubleshooting
- Invalid subscription or API key error: If you see an error about invalid subscription or API key, verify that your API key credential for the external validation service is correct and active.
- Unknown operation error: Ensure the selected operation matches the supported ones for the "Bots" resource; otherwise, the node will throw an unknown operation error.
- Permission errors from Telegram: If the bot lacks sufficient rights, Telegram may return errors. Make sure the bot is an administrator with appropriate rights in the target chats or channels.
- Malformed JSON in Options: The "Options" property expects valid JSON. Invalid JSON syntax will cause parsing errors.