OneBot-api icon

OneBot-api

Consume OneBot API

Overview

This node integrates with the OneBot API to perform various operations related to groups, friends, bots, messages, and members. Specifically for the "群组" (Group) resource and the "设置群签到" (Set Group Sign) operation, it allows users to set or update the group sign (a kind of group announcement or signature). This is useful for group administrators or owners who want to manage group information dynamically through n8n workflows.

Common scenarios include:

  • Automatically updating a group sign based on external events or schedules.
  • Managing multiple groups' signs in bulk via automation.
  • Integrating group sign updates with other messaging or notification systems.

Example: A community manager can use this node to update the daily agenda or rules in the group sign automatically every morning.

Properties

Name Meaning
Group Name or ID Select the target group from a list or specify its ID using an expression.

The property "Group Name or ID" uses a dynamic options loader (getGroupList) to fetch available groups. It is required for the "设置群签到" operation.

Output

The node outputs JSON data representing the result of the executed operation. The structure typically includes success status and any returned data from the OneBot API call related to setting the group sign.

If errors occur 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 indicated for this operation.

Dependencies

  • Requires connection to the OneBot API via an API key credential configured in n8n.
  • The node depends on the OneBot API endpoints such as set_group_sign and group listing endpoints to load group options.
  • Proper permissions are needed for the bot account to modify group signs (usually requires admin or owner privileges).

Troubleshooting

  • Common issues:

    • Insufficient permissions: The bot must be a group admin or owner to set the group sign.
    • Invalid group ID: Ensure the selected group exists and the ID is correct.
    • API connectivity problems: Verify the API key and network access to the OneBot server.
  • Error messages:

    • "Unable to get login info": Indicates failure to authenticate or retrieve bot user info; check credentials.
    • "Failed to get group list": The bot cannot retrieve groups; verify permissions and API availability.
    • Errors during execution will appear in the output JSON under the error field with descriptive messages.

Resolving these usually involves checking API credentials, ensuring the bot has appropriate group roles, and confirming network connectivity.

Links and References

Discussion