Actions33
- Mini Program Actions
- WeChat Pay Actions
- Official Account Actions
- WeChat Work Actions
Overview
The node "WeChat Enhanced" integrates with various WeChat services, including Official Accounts, Mini Programs, 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 useful for businesses or developers who want to customize the navigation menu of their Official Account to provide quick access to different features or links directly within the WeChat app. For example, a restaurant could create a menu with buttons linking to their online ordering system, location map, and customer service chat.
Properties
| Name | Meaning |
|---|---|
| Menu Data | The custom menu configuration in JSON format. This JSON defines the structure and content of the 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 status or error details.
- No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for the external "N8N Tools API" service used for validation (optional; if missing, validation is skipped).
- Uses the internal
WeChatApiclass to interact with WeChat's Official Account API. - The node expects valid credentials configured for accessing the WeChat Official Account API (such as tokens or keys), though these are abstracted away in the code.
- The user must provide valid JSON for the menu configuration according to WeChat's menu creation API specification.
Troubleshooting
- Invalid JSON in Menu Data: If the provided menu JSON is malformed, the node will throw an error when parsing it. Ensure the JSON is correctly formatted.
- API Key or Subscription Issues: If the N8N Tools API key is invalid or subscription is inactive, the node throws an error indicating invalid subscription or API key.
- WeChat API Errors: Errors returned by the WeChat API (e.g., due to invalid menu structure or permissions) will be propagated. Check the error message for details.
- Credential Missing: If required WeChat credentials are not set up properly, API calls will fail. Verify that the necessary authentication tokens or keys are configured.
- Continue On Fail: If enabled, errors during execution will be captured in the output JSON under an
errorproperty instead of stopping the workflow.
Links and References
- WeChat Official Account Custom Menu Documentation
- n8n Documentation on Creating Custom Nodes
- JSON Validator Tool – Useful for validating the menu JSON before use