Actions13
Overview
This node integrates with the OneBot API to manage and interact with group chats on a messaging platform. Specifically, the "获取群信息" (Get Group Info) operation retrieves detailed information about a specified group by its name or ID. This is useful for scenarios where you need to fetch metadata about a group, such as its name, ID, member count, or other attributes managed by the bot.
Practical examples include:
- Automatically retrieving group details to display in dashboards.
- Using group info to conditionally send messages or perform administrative actions.
- Auditing group settings or membership status programmatically.
Properties
| Name | Meaning |
|---|---|
| Group Name or ID | Select a group by entering its name or ID. The list is dynamically loaded from available groups. Required for operations including getting group info. |
Output
The node outputs JSON data representing the response from the OneBot API for the requested operation. For the "获取群信息" operation, the output JSON contains detailed information about the specified group, such as group ID, group name, and possibly other metadata returned by the API.
If an error occurs during execution, 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 a OneBot-compatible API endpoint.
- Requires an API key credential configured in n8n for authentication with the OneBot API.
- The node uses internal helper functions to make HTTP requests to the OneBot API.
Troubleshooting
- Missing or invalid Group ID: If the group ID is not provided or invalid, the node throws an error indicating that a valid group ID is required.
- Permission errors: Some operations require the bot to have admin or owner permissions in the group. If the bot lacks these permissions, the node will throw an error explaining the permission issue.
- API request failures: Network issues or incorrect API credentials can cause request failures. Check the API endpoint and credentials configuration.
- Empty or no group found: If the group list cannot be retrieved or the specified group does not exist, the node may return an empty list or an error.
Links and References
- OneBot API Documentation (general reference for the API used)
- n8n documentation on Creating Custom Nodes
- Relevant community forums or GitHub repositories for OneBot integrations