Actions13
Overview
This node integrates with the OneBot API to manage group chats on a messaging platform. Specifically, the "踢出群成员" (Kick Group Member) operation allows a bot with administrative privileges to remove a member from a managed group. This is useful for automating moderation tasks such as removing disruptive users or enforcing group rules.
Typical scenarios include:
- Automatically kicking members who violate group policies.
- Moderation bots that maintain group order without manual intervention.
- Integration with external systems to trigger kicks based on events or commands.
Example: A community manager sets up this node to kick users who post spam messages automatically by triggering this operation when spam is detected.
Properties
| Name | Meaning |
|---|---|
| Group Name or ID | Select a group where you have management rights (group owner or admin). |
| Member Name or ID | Select the group member to be kicked. You can search by nickname or user ID. |
| Reject Future Join Requests | Boolean flag to add the kicked member to the group's blacklist, preventing future join requests. |
Output
The node outputs JSON data representing the response from the OneBot API after attempting the kick operation. The output includes success status and any error messages if the operation failed.
The structure typically looks like:
[
{
"success": true,
// additional response fields depending on API
}
]
If an error occurs, the output JSON will contain an error field describing the issue and "success": false.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the OneBot API.
- The bot must have administrative or owner permissions in the target group to perform the kick.
- The node depends on the OneBot API endpoints such as
get_login_info,get_group_member_info, andset_group_kick. - Proper n8n credentials configuration for the OneBot API is necessary.
Troubleshooting
Common Issues:
- Insufficient permissions: The bot must be an admin or owner of the group to kick members.
- Invalid group or user IDs: Ensure the selected group and member exist and are valid.
- Network or API errors: Connectivity issues or API downtime may cause failures.
Error Messages:
"无法执行操作: set_group_kick 需要管理员权限,当前机器人不是群 {group_id} 的管理员或群主"
Means the bot lacks admin rights in the specified group. Verify bot's role."操作需要有效的群ID,但未提供"
Indicates missing or invalid group ID input."获取登录信息失败,无法检查权限"
Failure to retrieve login info; check API credentials and connectivity.
To resolve errors:
- Confirm the bot has the required group permissions.
- Double-check input parameters for correctness.
- Ensure API credentials are valid and network access is stable.
Links and References
- OneBot API Documentation (general reference for API endpoints)
- n8n documentation on Creating Custom Nodes
- Messaging platform group management guidelines (platform-specific, if applicable)