Wechat Official Account Node icon

Wechat Official Account Node

Wechat Official Account Node

Overview

This node integrates with the Wechat Official Account platform, specifically allowing users to modify existing draft messages. It is useful for scenarios where you need to update or correct content in a previously saved draft before publishing it. For example, if you have a multi-article draft and want to update one article's content without recreating the entire draft, this node operation enables that precise update.

Properties

Name Meaning
草稿ID The unique identifier (media_id) of the draft you want to modify.
要更新的文章在图文消息中的位置 The position index of the article within the multi-article draft to update (starting at 0). Only relevant for drafts containing multiple articles.
草稿对象(Articles)内容 The new content of the draft article(s) in JSON format. This should follow the structure defined by the official Wechat API documentation for updating drafts.

Output

The node outputs an array of JSON objects representing the result of the update operation for each input item processed. Each output item corresponds to an input item and contains either the successful response data from the Wechat API or an error message if the update failed.

If the operation fails for any item and "Continue On Fail" is enabled, the output will include an error object with the error message for that specific item.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Wechat Official Account platform.
  • The node depends on internal resource and operation modules dynamically loaded from the resource directory.
  • The user must provide valid media_id and properly structured article content according to Wechat's draft update API specification.

Troubleshooting

  • Common issues:
    • Providing an invalid or expired media_id will cause the update to fail.
    • Incorrectly formatted JSON for the articles property may lead to API errors.
    • Specifying an out-of-range index for the article position in a multi-article draft can cause errors.
  • Error messages:
    • Errors returned from the Wechat API will be included in the output JSON under an error field when "Continue On Fail" is enabled.
    • If the operation method is not implemented or cannot be found, the node throws an error indicating the missing method for the specified resource-operation combination.
  • To resolve errors, verify the correctness of all input parameters, ensure the API credentials are valid, and consult the official Wechat API documentation for the expected JSON structure.

Links and References

Discussion