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
The node "N8N Tools Telegram" enables interaction with the Telegram Bot API, supporting a wide range of Telegram bot operations. Specifically for the Chats resource and the Set Chat Permissions operation, this node allows you to modify the permissions of a Telegram chat by setting what members are allowed or disallowed to do within that chat.
This is useful in scenarios where you want to programmatically control chat member permissions, such as restricting message sending, media sharing, or other actions in group chats or channels. For example, a bot can automatically restrict new members from sending messages until they are approved, or adjust permissions based on certain triggers or workflows.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier for the target Telegram chat where permissions will be set. |
| Options | Additional options as a JSON object (not used directly in this operation). |
| Permissions | A JSON string representing the permissions to apply to the chat. This defines allowed or disallowed actions for chat members. |
Note: Although your provided properties JSON only lists chatId and options, the code shows that for the "setChatPermissions" operation, a parameter named permissions is required and parsed as JSON. This property should be supplied as a JSON string describing the permissions to set.
Output
The output is a JSON object containing the response from the Telegram Bot API after attempting to set the chat permissions. This typically includes confirmation of success or details about the updated permissions.
The output structure depends on the Telegram API's response for the setChatPermissions method, which usually returns a boolean indicating success or an object with more detailed information.
No binary data output is involved in this operation.
Dependencies
- Requires an active Telegram Bot API token configured via an API key credential.
- 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 the Telegram Bot API.
- Proper configuration of credentials in n8n is necessary for authentication.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that the API key credential is correctly set up and has an active subscription.
- Malformed permissions JSON: Since permissions must be provided as a JSON string, ensure it is well-formed and matches Telegram's expected permissions schema.
- Unknown operation error: If the operation name is incorrect or unsupported, the node will throw an error. Confirm that "setChatPermissions" is selected under the Chats resource.
- HTTP request failures: Network issues or Telegram API downtime may cause errors. Check connectivity and Telegram service status.
- Permission denied: The bot must have appropriate admin rights in the chat to change permissions; otherwise, the API call will fail.