Actions33
- Mini Program Actions
- Official Account Actions
- WeChat Pay Actions
- WeChat Work Actions
Overview
The WeChat Work "Upload Media" operation allows users to upload media files (such as images, voice recordings, videos, thumbnails, or generic files) to the WeChat Work platform. This is useful for scenarios where you need to programmatically add media content to your WeChat Work account for use in messages, posts, or other interactions within the WeChat Work ecosystem.
Practical examples include:
- Uploading an image to be sent as part of a message to employees or groups.
- Uploading a video or voice note to share important announcements.
- Uploading files that can be referenced or shared within WeChat Work conversations.
This operation accepts base64 encoded media data and uploads it according to the specified media type.
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. |
Output
The output JSON contains the response from the WeChat Work API after uploading the media. Typically, this includes metadata such as the media ID assigned by WeChat Work, which can be used later to reference or send the uploaded media.
If the node supports binary data output for media retrieval operations, it would be summarized here; however, for upload, the output is JSON metadata only.
Dependencies
- Requires an active subscription and valid API key for the external N8N Tools API service.
- Requires credentials for authenticating with the WeChat Work API.
- The node uses the
WeChatApihelper class internally to interact with WeChat Work endpoints. - The media data must be provided as a base64 encoded string.
Troubleshooting
- Invalid Subscription or API Key: If the node throws errors related to 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 the actual content being uploaded.
- Base64 Encoding Issues: The media property must be properly base64 encoded. Improper encoding will cause upload failures.
- API Rate Limits or Permissions: Errors may occur if the WeChat Work account lacks permissions or exceeds rate limits. Check account settings and API quotas.
- Error Messages: The node surfaces error messages from the underlying API calls. Review these messages for clues on misconfiguration or invalid input.