OneBot-api icon

OneBot-api

Consume OneBot API

Overview

This node integrates with the OneBot API to manage and interact with group chats on a messaging platform. Specifically, for the "群组" (Group) resource and the "获取群成员信息" (Get Group Member Info) operation, it retrieves detailed information about a specific member within a selected group.

Typical use cases include:

  • Fetching profile details or status of a particular group member.
  • Automating group management tasks that require member data.
  • Integrating group member info into workflows for notifications, audits, or analytics.

For example, you might use this node to get the nickname, role, or join date of a user in a group before sending them a personalized message or updating a database.

Properties

Name Meaning
Group Name or ID Select a group from the list or specify its ID via expression. This identifies the target group.
Member Name or ID Select a member from the chosen group's member list or specify their ID via expression.

These properties are required to specify which group and which member's information to retrieve.

Output

The node outputs JSON data containing the requested group member's information. The structure typically includes fields such as:

  • Member ID
  • Nickname or display name
  • Role within the group (e.g., member, admin, owner)
  • Additional profile details provided by the OneBot API

If the operation fails, the output JSON will contain an error field describing the issue and a success flag set to false.

No binary data is output by this operation.

Dependencies

  • Requires connection to a OneBot API endpoint.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • The node uses internal helper methods to load options dynamically for groups and members, so the API must support these endpoints.

Troubleshooting

  • Common issues:

    • Failure to retrieve group or member lists due to insufficient permissions or invalid credentials.
    • Specifying a group or member ID that does not exist or is inaccessible.
    • Network or API errors causing request failures.
  • Error messages:

    • "Failed to get login info": Indicates inability to authenticate or retrieve bot login details; check API credentials.
    • "Failed to get group list" or "Failed to get group member info": Suggests permission issues or incorrect group/member IDs.
    • General API request errors will be returned in the error field of the output JSON.
  • Resolutions:

    • Verify API credentials and permissions.
    • Ensure the specified group and member IDs are correct and accessible by the bot.
    • Check network connectivity and API endpoint availability.

Links and References

Discussion