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 operations related to Telegram chats, messages, updates, bots, files, inline queries, and callback queries. Specifically, for the Chats resource and the Get Chat Administrators operation, it retrieves a list of administrators in a specified Telegram chat.
This functionality is useful when you want to programmatically manage or audit chat administrators in groups or channels. For example, you might use this node to:
- Automatically fetch and log the current administrators of a group.
- Trigger workflows based on changes in chat administration.
- Verify if a user has admin rights before performing certain actions.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier for the Telegram chat from which to get admins. |
| Options | Additional optional parameters as JSON (not specifically used here). |
Output
The output json field contains the response from the Telegram Bot API's method that returns the list of chat administrators. This typically includes an array of administrator objects, each describing a user with their status and permissions within the chat.
Example structure (simplified):
{
"ok": true,
"result": [
{
"user": {
"id": 123456789,
"is_bot": false,
"first_name": "AdminName",
"username": "adminusername"
},
"status": "administrator",
"can_be_edited": true,
"custom_title": "Group Admin",
"can_change_info": true,
"can_delete_messages": true,
"can_invite_users": true,
"can_restrict_members": true,
"can_pin_messages": true,
"can_promote_members": false
}
// ... more admins
]
}
No binary data output is involved in this operation.
Dependencies
- Requires an active Telegram Bot API token configured via credentials.
- Requires a valid subscription and API key for the external "N8N Tools API" service, which validates usage before forwarding requests to Telegram.
- The node uses HTTP requests to communicate with both the N8N Tools API and Telegram Bot API endpoints.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that your API key credential is correct and active.
- Unknown operation error: Ensure the selected operation matches the supported ones for the chosen resource.
- Chat ID errors: Make sure the Chat ID is correct and that the bot has permission to access the chat information.
- Permission issues: The bot must be an administrator in the chat to retrieve administrators; otherwise, the API will return an error.
- JSON parsing errors: Input properties like "Options" must be valid JSON if used.