Actions19
Overview
This node integrates with the OneBot API to perform various operations related to friends, groups, messages, bots, members, and miscellaneous actions. Specifically, for the resource "好友" (Friend) and operation "私聊戳一戳" (Send friend poke), it allows sending a "poke" or nudge to a friend in a private chat. This can be useful for drawing attention to a conversation or playfully interacting with contacts.
Common scenarios include:
- Sending a quick poke to a friend to get their attention.
- Automating social interactions such as likes, pokes, or private messages.
- Managing friend-related actions programmatically within workflows.
Example: Automatically send a poke to a user when a certain event triggers in your workflow, like a reminder or notification.
Properties
| Name | Meaning |
|---|---|
| User Name or ID | Select a friend from the list or specify their ID using an expression. This identifies the target friend to send the poke to. |
(Note: The property is required for the "send_friend_poke" operation under the "friend" resource.)
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. If an error occurs, the output JSON contains an error field with the error message and success set to false.
No binary data output is indicated for this operation.
Dependencies
- Requires connection to a OneBot API endpoint.
- Needs an API key credential configured in n8n for authentication.
- The node uses internal helper functions to load friend lists dynamically for selection options.
- Proper permissions on the bot account to send pokes to friends.
Troubleshooting
Common issues:
- Failure to retrieve friend list due to authentication or network errors.
- Attempting to poke a user not in the friend list or invalid user ID.
- Insufficient permissions for the bot to send pokes.
Error messages:
"Failed to get login info": Indicates the API key or connection is invalid or expired."Unknown resource type": Occurs if an unsupported resource is selected.- Errors during execution will be output in the JSON
errorfield; check logs for detailed messages.
Resolutions:
- Verify API credentials and connectivity.
- Ensure the target user is a valid friend.
- Confirm the bot has necessary permissions to perform the action.