Actions33
- Mini Program Actions
- WeChat Pay Actions
- Official Account Actions
- WeChat Work Actions
Overview
This node operation creates a QR code for a WeChat Mini Program. It allows users to generate either a standard or an unlimited QR code that encodes specific scene parameters and optionally points to a particular page within the Mini Program. This is useful for scenarios such as marketing campaigns, user onboarding, or quick access links where scanning the QR code directs users to a targeted part of the Mini Program.
Practical examples include:
- Generating a QR code that encodes a promotional campaign ID (
scene) so that when scanned, the Mini Program can display campaign-specific content. - Creating a QR code that opens a specific page inside the Mini Program, such as a product detail page, by specifying the
pagepath. - Producing an unlimited QR code for long-term use without expiration, suitable for permanent signage or printed materials.
Properties
| Name | Meaning |
|---|---|
| Scene | The scene parameter encoded in the QR code; typically used to carry custom data or IDs. |
| Page | (Optional) The path to a specific Mini Program page that the QR code will open. |
| Width | The width of the generated QR code image in pixels (default is 430). |
Output
The output JSON contains the result returned from the WeChat API for creating the QR code. Typically, this includes:
- A URL or binary data representing the generated QR code image.
- Metadata about the QR code generation request.
If the node supports binary output (not explicitly shown in the provided code), it would represent the QR code image file itself, which can be used directly in workflows requiring image files.
Dependencies
- Requires an API key credential for the "N8N Tools API" service to validate subscription and access rights.
- Uses the WeChat API wrapper internally to interact with WeChat Mini Program services.
- The node expects proper configuration of credentials that provide access tokens or API keys for WeChat Mini Programs.
Troubleshooting
- Invalid Subscription or API Key: If the validation request to the N8N Tools API returns 401 or 403, the node throws an error indicating invalid subscription or API key. Ensure that the API key credential is correctly configured and active.
- Unsupported Operation Error: If an unsupported operation is specified, the node throws an error. Verify that the operation name matches one of the supported operations for the Mini Program resource.
- Missing Required Parameters: The
sceneparameter is required. Omitting it will likely cause the API call to fail. Make sure all required fields are filled. - API Request Failures: Network issues or incorrect credentials may cause HTTP request failures. Check network connectivity and credential validity.
Links and References
- WeChat Mini Program QR Code Documentation
- WeChat Official API Reference
- n8n Documentation on Custom Nodes
This summary is based solely on static analysis of the provided source code and property definitions.