Actions18
Overview
This node integrates with the WeChat Official Account API to send a custom menu message to a specified user. It is designed for scenarios where an automated system or customer service wants to present interactive menu options directly within a chat, allowing users to select from predefined choices.
Typical use cases include:
- Customer support bots offering quick-reply menus.
- Marketing campaigns presenting product categories or promotions.
- Interactive guides or surveys delivered via WeChat messages.
For example, a business could send a menu message with options like "View Products," "Contact Support," and "Latest Offers," enabling users to tap their choice and trigger further actions.
Properties
Name | Meaning |
---|---|
接收用户ID (to_user) | The OpenID of the WeChat user who will receive the menu message. This uniquely identifies the recipient user. |
头部内容 (msgmenu_head) | The header content text displayed at the top of the menu message sent to the user. |
选项列表 (msgmenu_list) | A list of clickable menu options presented to the user. Each option includes: - ID: A business identifier corresponding to the menu item. - 显示内容: The display text shown for this menu option. |
底部内容 (msgmenu_tail) | The footer content text displayed at the bottom of the menu message sent to the user. |
Output
The node outputs JSON data representing the response from the WeChat API after sending the menu message. This typically includes status information about whether the message was successfully sent or if any errors occurred.
If the node supports binary data output, it would relate to media content, but for this operation (sending menu messages), the output is purely JSON indicating success or failure.
Dependencies
- Requires an active WeChat Official Account API credential with appropriate permissions to send customer service messages.
- The node uses the WeChat API endpoint under
/cgi-bin/
base URL. - Proper configuration of the API key or token in n8n credentials is necessary for authentication.
Troubleshooting
Common issues:
- Invalid or missing user OpenID (
to_user
) will cause message delivery failure. - Incorrectly formatted menu options (missing IDs or content) may result in API errors.
- Expired or invalid API credentials will prevent successful message sending.
- Invalid or missing user OpenID (
Error messages:
- Errors returned by the WeChat API often include error codes and messages indicating issues such as invalid parameters or authentication failures.
- To resolve, verify that all required fields are correctly filled, the user OpenID is valid, and the API credentials are up to date.