Actions19
Overview
This node interacts with the OneBot API to manage group-related operations in a chat or messaging platform. Specifically, the "设置群名称" (Set Group Name) operation allows users who have administrative or owner privileges in a group to change the group's name.
Typical use cases include:
- Renaming a group to reflect a new topic or purpose.
- Correcting or updating the group name for clarity.
- Automating group management tasks where group names need to be dynamically updated based on external triggers.
For example, an admin could use this node to rename a project discussion group after a project phase completes, ensuring group names stay relevant and organized.
Properties
| Name | Meaning |
|---|---|
| Group Name or ID | Select the target group from a list of manageable groups or specify its ID via expression. |
| New Group Name | The new name to assign to the selected group. This is a required string input. |
Output
The node outputs JSON data representing the result of the API call to set the group name. Typically, this will include success status and any returned data from the OneBot API confirming the name change.
If an error occurs, the output JSON will contain an error field with the error message and a success field set to false.
No binary data output is involved in this operation.
Dependencies
- Requires connection to the OneBot API via an API key credential configured in n8n.
- The user must have appropriate permissions (group owner or administrator) in the target group to perform the name change.
- The node uses internal helper methods to fetch manageable groups (
getManagedGroupList) to populate the group selection dropdown.
Troubleshooting
- Permission Errors: If the bot or user does not have admin or owner rights in the group, the operation will fail. Ensure the credentials used belong to a user with sufficient privileges.
- Invalid Group ID: Selecting or specifying a non-existent or unmanaged group ID will cause errors. Use the provided dropdown or verify the group ID carefully.
- Empty or Invalid Group Name: The new group name must be a non-empty string. Providing invalid input may cause the API to reject the request.
- API Connectivity Issues: Network problems or incorrect API credentials can lead to failure in fetching group lists or setting the name. Verify API endpoint accessibility and credential correctness.
- Error Messages: The node returns error messages in the output JSON under the
errorkey. Review these messages to identify issues such as permission denied, invalid parameters, or API errors.
Links and References
- OneBot API Documentation (general reference for API endpoints)
- n8n Expressions Documentation (for using expressions in property fields)