Actions43
- 用户标签 Actions
- 用户 Actions
- 模板 Actions
- 发布 Actions
- 其他 Actions
- 菜单 Actions
- 素材 Actions
- 草稿 Actions
- 评论 Actions
Overview
This node integrates with the Wechat Official Account platform to manage media assets. Specifically, for the resource "素材" (media material), it supports the operation "新增其他类型永久素材" (add other types of permanent media). This operation allows users to upload various types of permanent media files such as images, voice recordings, videos, and thumbnails to their Wechat Official Account.
Common scenarios where this node is beneficial include:
- Uploading promotional images or thumbnails for articles.
- Adding voice messages or audio clips for interactive content.
- Uploading video materials with titles and descriptions for richer media engagement.
For example, a marketing team could use this node to programmatically upload a new product video along with its title and introduction, making it available permanently on their official account.
Properties
| Name | Meaning |
|---|---|
| 媒体文件类型 (type) | The type of media file to upload. Options: 图片 (image), 语音 (voice), 视频 (video), 缩略图 (thumb) |
| 文件 (inputDataFieldName) | The name of the input field containing the binary data of the file to be uploaded. Typically refers to the binary property key in the input data. |
| 视频素材的标题 (videoTitle) | The title of the video media, required when uploading video type. Maximum length is 30 characters. |
| 视频素材的介绍 (videoIntroduction) | An optional description/introduction for the video media. Only applicable when uploading video type. |
Output
The node outputs an array of JSON objects representing the result of the upload operation for each input item. Each output JSON object typically contains metadata about the uploaded media, such as media IDs or URLs assigned by the Wechat Official Account platform.
If the node handles binary data input, it expects the binary file data to be provided in the specified input field but does not output binary data itself.
Dependencies
- Requires valid credentials for accessing the Wechat Official Account API, specifically an API authentication token or key configured in n8n.
- The node depends on the Wechat Official Account platform's media upload API endpoints.
- No additional external services are indicated beyond the official Wechat API.
Troubleshooting
Common issues:
- Incorrect or missing binary data field name: Ensure the
inputDataFieldNamematches the actual binary property name in the input data. - Invalid media type selection: Choose one of the supported media types; otherwise, the operation will fail.
- For video uploads, omitting the required
videoTitleor exceeding the character limit may cause errors. - API authentication failures due to invalid or expired credentials.
- Incorrect or missing binary data field name: Ensure the
Error messages:
"未实现方法: 素材.新增其他类型永久素材"indicates the operation is not implemented or recognized; verify the resource and operation names.- Errors related to binary data access usually mention missing or invalid binary property.
- API errors from Wechat may include rate limits or invalid media format errors; consult Wechat API documentation for resolution.