Actions43
- 用户标签 Actions
- 用户 Actions
- 模板 Actions
- 发布 Actions
- 其他 Actions
- 菜单 Actions
- 素材 Actions
- 草稿 Actions
- 评论 Actions
Overview
This node integrates with the Wechat Official Account platform, enabling users to perform various operations related to Wechat resources. Specifically, for the resource "素材" (media material), it supports uploading temporary media files such as images, voice recordings, videos, and thumbnails.
A common use case is automating the upload of media content to a Wechat Official Account, which can then be used in messages, posts, or other interactions within the Wechat ecosystem. For example, a marketing automation workflow might upload promotional images or videos dynamically before sending them out to subscribers.
Properties
| Name | Meaning |
|---|---|
| 媒体文件类型 | The type of media file to upload. Options are: 图片 (image), 语音 (voice), 视频 (video), 缩略图 (thumbnail). |
| 文件 | The name of the input field containing the binary data of the file to upload. This should match the binary property name from the input data panel. |
Output
The node outputs an array of JSON objects representing the result of the upload operation for each input item processed. Each output item contains metadata about the uploaded media, such as media ID, type, and possibly expiration time depending on the Wechat API response.
If the node processes multiple items, the output will include corresponding results for each, preserving the order and pairing with the input items.
Binary data is not output by this node; it only returns JSON metadata about the uploaded media.
Dependencies
- Requires an API key credential for authenticating with the Wechat Official Account platform.
- The node depends on internal helper modules for resource and operation management.
- No external environment variables are explicitly required beyond the API authentication credentials.
Troubleshooting
Common issues:
- Incorrect or missing binary data field name: Ensure that the "文件" property matches exactly the name of the binary input field containing the media file.
- Unsupported media type: Verify that the media file type corresponds to one of the allowed options (image, voice, video, thumbnail).
- Authentication errors: Confirm that the API key credential is valid and has sufficient permissions.
Error messages:
"未实现方法: 素材.上传临时素材"indicates that the requested resource-operation combination is not implemented. This usually means a misconfiguration or unsupported operation.- Errors during the upload call will be logged with detailed messages. If "Continue On Fail" is disabled, the node execution will stop on the first error; otherwise, errors will be returned as part of the output for individual items.
Links and References
- Wechat Official Account API Documentation (official docs for media upload)
- n8n documentation on working with binary data