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 integrates with the Telegram Bot API to perform various chat-related operations. Specifically, for the "Chats" resource and the "Restrict Chat Member" operation, it allows you to restrict a member's permissions within a Telegram chat. This is useful in scenarios where you want to limit what a user can do in a group or channel, such as muting them temporarily or restricting their ability to send messages or media.
Practical examples include:
- Temporarily muting a disruptive user in a group chat.
- Restricting new members from posting links or media until they are verified.
- Applying custom restrictions based on chat rules automatically via workflows.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier for the target Telegram chat where the restriction will be applied. |
| User ID | The unique identifier of the Telegram user to restrict in the specified chat. |
| Options | Additional optional parameters for the restriction operation (e.g., duration, permissions). |
Output
The output is a JSON object representing the response from the Telegram Bot API after attempting to restrict the chat member. It typically contains information about the success or failure of the operation and any relevant data returned by the API.
If the operation fails and "Continue On Fail" is enabled, the output JSON will contain an error field with the error message.
This node does not output binary data.
Dependencies
- Requires an active Telegram Bot API token configured as credentials in n8n.
- Requires a valid subscription and API key for the external "N8N Tools API" service used for validation before making Telegram API calls.
- The node uses HTTP requests to communicate with both the N8N Tools API and the Telegram Bot API.
Troubleshooting
- Invalid Subscription or API Key: If the node throws an error indicating invalid subscription or API key, verify that your API key credential for the external validation service is correct and active.
- Permission Errors: Telegram may reject the restriction if the bot lacks admin rights in the chat or if the user ID is invalid. Ensure the bot has appropriate permissions.
- Malformed Options: The "Options" property expects a JSON object. Invalid JSON or incorrect permission structures may cause errors.
- Unknown Operation Error: If the operation name is incorrect or unsupported, the node will throw an "Unknown operation" error.
- Continue On Fail Behavior: When enabled, errors for individual items will be captured in the output JSON under an
errorfield instead of stopping execution.