Actions33
- Mini Program Actions
- Official Account Actions
- WeChat Pay Actions
- WeChat Work Actions
Overview
The node "WeChat Enhanced" provides comprehensive integration with various WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically, for the Official Account resource and the Create Menu operation, this node allows users to create a custom menu for their WeChat Official Account by sending menu configuration data in JSON format.
This is beneficial for businesses or developers who want to customize the navigation menus of their Official Accounts to improve user engagement and provide quick access to key features or content. For example, a company can create a menu with buttons linking to product catalogs, customer support, or promotional campaigns directly within the WeChat interface.
Properties
| Name | Meaning |
|---|---|
| Menu Data | The menu structure and configuration in JSON format. This JSON defines the layout, buttons, and actions of the custom menu to be created on the Official Account. |
Output
- The output
jsonfield contains the response from the WeChat API after attempting to create the menu. - The exact structure depends on the WeChat API response but typically includes success confirmation or error details.
- No binary data output is involved in this operation.
Dependencies
- Requires an active subscription and valid API key credential for the external "N8N Tools API" service used for validation.
- Requires credentials for authenticating with WeChat Official Account APIs (e.g., OAuth2 tokens or API keys).
- The node internally uses a helper class (
WeChatApi) to interact with WeChat's Official Account endpoints. - Proper configuration of these credentials in n8n is necessary for successful execution.
Troubleshooting
- Invalid Subscription or API Key: If the node throws an error about invalid subscription or API key, verify that the API key credential for the external validation service is correct and active.
- Malformed JSON in Menu Data: Since the menu data must be valid JSON, ensure the input JSON string is correctly formatted. Invalid JSON will cause parsing errors.
- Unsupported Operation Error: If the operation name is incorrect or unsupported, the node will throw an error indicating so.
- WeChat API Errors: Errors returned from the WeChat API (e.g., permission denied, invalid menu structure) will be passed through. Check the WeChat Official Account developer documentation for error codes and resolutions.
- Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error messages in the output JSON.
Links and References
- WeChat Official Account Custom Menu Documentation
- n8n Documentation on Credentials
- JSON Format Validator – Useful for validating the "Menu Data" property before use.