WeChat icon

WeChat

Create drafts and publish articles to WeChat Official Account

Overview

This node integrates with the WeChat Official Account API to manage media and articles. Specifically, the 'Upload Media' operation allows users to upload media files such as images or thumbnails to WeChat. This is useful for preparing media assets that can be used in articles or drafts published on a WeChat Official Account. For example, a user can upload an image file from binary data in the workflow to WeChat, which then returns a media ID for use in subsequent operations like creating drafts or publishing articles.

Use Case Examples

  1. Uploading an image file from a binary data property to WeChat to obtain a media ID for article thumbnails.
  2. Uploading a thumbnail image to be used in a WeChat article draft.

Properties

Name Meaning
Media Type The type of media to upload, either an image or a thumbnail.
Media File The binary data property name containing the file to upload.

Output

JSON

  • json
    • media_id - The media ID returned by WeChat after successful upload, used to reference the uploaded media in other operations.

Dependencies

  • WeChat API credentials including appId and appSecret for authentication.

Troubleshooting

  • Error 'No binary data found for property' indicates the specified binary property does not exist or is empty; ensure the binary data is correctly passed to the node.
  • Invalid media type or unsupported file format may cause upload failures; verify the media type and file format are supported by WeChat API.
  • Network or authentication errors may occur if API credentials are incorrect or the WeChat API is unreachable; verify credentials and network connectivity.

Links

Discussion