Actions19
Overview
This node interacts with the OneBot API to manage group-related operations in a chat or messaging platform. Specifically, for the "群组" (Group) resource and the "踢出群成员" (Kick Group Member) operation, it allows you to remove one or more members from a managed group. This is useful for group administrators or owners who want to moderate their groups by removing disruptive or unwanted members.
Practical examples include:
- Automatically kicking users who violate group rules.
- Removing inactive members based on certain criteria.
- Managing group membership dynamically as part of a workflow.
Properties
| Name | Meaning |
|---|---|
Group Name or ID (group_id) |
Select the target group from a list of groups you manage or specify its ID via expression. Required. |
成员 Names or IDs (user_ids) |
Select one or more members to kick from the chosen group, either from a list or by specifying IDs. Required. |
Reject Future Join Requests (reject_add_request) |
Boolean flag indicating whether to blacklist the kicked members to reject any future join requests from them. Defaults to false. |
Output
The node outputs JSON data representing the result of the kick operation. The structure typically includes success status and any error messages if the operation fails. The output corresponds to the response from the OneBot API after attempting to kick the specified members.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the OneBot API via an API key credential configured in n8n.
- The user running the node must have administrative or owner privileges in the target group to perform member kicks.
- The node uses internal helper methods to fetch lists of manageable groups and group members dynamically.
Troubleshooting
Common issues:
- Insufficient permissions: The bot account must be a group admin or owner to kick members.
- Invalid group or user IDs: Ensure that the selected group and members exist and are correctly specified.
- Network or API errors: Connectivity issues or API downtime can cause failures.
Error messages:
"Failed to get login info"or"Failed to get managed group list"indicates authentication or permission problems."Unknown resource type"suggests misconfiguration of the resource parameter.- Errors returned from the API will be included in the output JSON under an
errorfield.
Resolutions:
- Verify API credentials and permissions.
- Confirm group and member selections.
- Check network connectivity and API service status.
Links and References
- n8n Expressions Documentation
- OneBot API official documentation (refer to your OneBot API provider for exact URLs)
- n8n community forums and support channels for troubleshooting help