Actions33
- Mini Program Actions
- WeChat Pay Actions
- Official Account Actions
- WeChat Work Actions
Overview
The node provides enhanced integration with WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically for the Mini Program resource and the Upload Media operation, it allows users to upload media files (such as images, voice, video, thumbnails, or generic files) to the WeChat Mini Program platform.
This operation is useful when you need to programmatically upload media content to a Mini Program, for example:
- Uploading images or videos to be used within the Mini Program.
- Uploading voice clips or other media types for interactive features.
- Managing media assets dynamically from workflows without manual intervention.
Properties
| Name | Meaning |
|---|---|
| Media Type | The type of media being uploaded. Options: Image, Voice, Video, Thumb, File |
| Media | The media file data encoded in base64 format. This is the actual content to upload |
Output
The output JSON contains the response from the WeChat API after uploading the media. Typically, this includes metadata about the uploaded media such as its media ID, type, and possibly URLs or other identifiers returned by WeChat.
If the node supports binary data output for media, it would represent the uploaded media file or related binary content, but in this case, the node returns JSON metadata only.
Dependencies
- Requires an API key credential for the "N8N Tools API" service to validate subscription and access.
- Uses the internal
WeChatApihelper class to interact with WeChat's Mini Program API endpoints. - The media content must be provided as a base64-encoded string.
- Proper configuration of credentials and permissions on the WeChat Mini Program side is necessary to allow media uploads.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that the API key credential is correctly configured and active.
- Unsupported media type: Ensure the media type selected matches one of the supported options (image, voice, video, thumb, file).
- Base64 encoding issues: The media property must be a valid base64-encoded string. Invalid encoding will cause upload failures.
- API quota limits: WeChat APIs often have rate limits; exceeding these may cause errors.
- Permission errors: Make sure the WeChat Mini Program has the required permissions to accept media uploads.
Links and References
- WeChat Mini Program Official Documentation
- WeChat Media Upload API Reference
- n8n Documentation on Custom Nodes
This summary focuses on the Mini Program resource and the Upload Media operation as requested, based on static analysis of the provided source code and properties.