Actions13
Overview
This node integrates with the OneBot API to perform various operations related to messaging and group management on a chat platform. Specifically, for the "消息" (Message) resource and the "发送群消息" (Send Group Message) operation, it allows users to send messages to a specified group.
Common scenarios where this node is beneficial include:
- Automating announcements or notifications to group chats.
- Sending batch messages to multiple groups.
- Integrating chatbot responses into group conversations.
Practical example:
- A company uses this node to automatically send daily updates or alerts to their team’s group chat.
- A community manager schedules event reminders to be sent to a group of members.
Properties
| Name | Meaning |
|---|---|
| Group Name or ID | Select the target group by name or ID; supports searching by group name or number. |
| Message | The text content of the message to send to the group. |
| Forward Mode | Boolean flag indicating whether to forward multiple messages as a single forwarded message. |
Output
The node outputs JSON data representing the response from the OneBot API after attempting to send the group message. This typically includes success status and any returned data from the API call.
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 an API key credential for authenticating with the OneBot API.
- The node depends on the OneBot API being accessible and properly configured.
- The node uses internal helper methods to load options dynamically, such as fetching the list of groups (
getGroupList).
Troubleshooting
- Missing or invalid Group ID: If the group ID is not provided or invalid, the node throws an error stating that a valid group ID is required.
- Permission errors: For some group-related operations, the bot must have appropriate admin or owner permissions in the group. Lack of these permissions results in errors indicating insufficient rights.
- API request failures: Network issues or incorrect API credentials can cause request failures. Check API connectivity and credential validity.
- Error messages: Errors are logged with descriptive messages, e.g., "Failed to get login info," "Failed to get group member info," or permission-related errors specifying the missing role.
To resolve common issues:
- Ensure the bot has the necessary permissions in the target group.
- Verify the group ID or name is correct and accessible.
- Confirm API credentials are correctly configured in n8n.
- Review logs for detailed error messages.
Links and References
- OneBot API Documentation (general reference for API endpoints)
- n8n documentation on Creating Custom Nodes
- Relevant community forums or support channels for OneBot integration troubleshooting