OneBot icon

OneBot

Consume OneBot API

Overview

This node integrates with the OneBot API to perform various operations related to bots, friends, groups, messages, and miscellaneous information. Specifically for the Group resource and the Get Group Member Info operation, it retrieves detailed information about a specific member within a specified group.

Common scenarios where this node is beneficial include:

  • Managing group memberships by fetching member details such as roles or statuses.
  • Automating group administration tasks based on member info.
  • Integrating group member data into workflows for notifications or analytics.

For example, you could use this node to get the profile information of a user in a group before sending them a personalized message or updating a database with their membership status.

Properties

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

Output

The output is a JSON array containing the response from the OneBot API for the requested group member information. This typically includes details such as the member's ID, nickname, role, join time, and other metadata provided by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the OneBot API via an API key credential configured in n8n.
  • The node uses internal helper methods to load options dynamically (e.g., group list, group member list) which depend on successful API communication.
  • No additional external services are required beyond the OneBot API.

Troubleshooting

  • Empty or missing group/member IDs: Ensure that the "Group Name or ID" and "Member Name or ID" fields are correctly set either by selecting from the dropdown or providing valid IDs via expressions.
  • API request failures: Common errors may occur if the API key is invalid, expired, or lacks permissions. Verify the API credentials and permissions.
  • Network issues: Connectivity problems can cause timeouts or failed requests. Check network access to the OneBot API endpoint.
  • Incorrect operation selection: Make sure the operation matches the resource; for example, "Get Group Member Info" must be used with the "Group" resource.
  • Load options not populating: If the dropdown lists for groups or members do not load, verify that the API connection is working and that the bot has access to those groups/members.

Links and References

Discussion