Actions43
- 用户标签 Actions
- 用户 Actions
- 模板 Actions
- 发布 Actions
- 其他 Actions
- 菜单 Actions
- 素材 Actions
- 草稿 Actions
- 评论 Actions
Overview
This node integrates with the WeChat Official Account platform to retrieve comments on previously sent mass messages. Specifically, the "查看评论" (View Comments) operation under the "评论" (Comment) resource allows users to fetch a list of comments associated with a particular message data ID. This is useful for social media managers or marketers who want to monitor audience engagement and feedback on their WeChat posts.
Common scenarios include:
- Fetching user comments on a specific article or post sent via a mass messaging campaign.
- Analyzing audience reactions by retrieving normal and/or featured comments.
- Paginating through comments by specifying start positions and counts.
Practical example:
A marketing automation workflow could use this node to pull comments from a recent campaign message, analyze sentiment or keywords, and trigger follow-up actions such as sending personalized replies or aggregating feedback reports.
Properties
| Name | Meaning |
|---|---|
| 消息数据ID (msg_data_id) | The unique identifier returned after sending a mass message; used to specify which message's comments to retrieve. |
| 图文索引 (index) | When multiple articles are included in one message, this specifies which article's comments to fetch (starting at 0). Defaults to the first article if not provided. |
| 起始位置 (begin) | The starting position index for fetching comments, enabling pagination. Required. |
| 获取数目 (count) | Number of comments to retrieve starting from begin. Must be less than 50 to avoid rejection. Required. |
| 评论类型 (type) | Type of comments to fetch: - 普通评论&精选评论 (Normal & Featured comments) - 普通评论 (Normal comments only) - 精选评论 (Featured comments only) |
Output
The node outputs an array of JSON objects representing the retrieved comments. Each object corresponds to a single comment and contains fields such as comment content, author information, timestamps, and possibly metadata indicating whether the comment is featured or normal.
If binary data were involved (e.g., images attached to comments), it would be summarized here, but based on the code and properties, the output focuses on JSON comment data only.
Dependencies
- Requires valid API credentials for the WeChat Official Account platform (an API key or token).
- The node depends on internal resource and operation modules dynamically loaded from the
resourcedirectory, specifically those implementing the "comment:list" operation. - No additional external services beyond the WeChat Official Account API are indicated.
Troubleshooting
Common issues:
- Providing an invalid or expired
msg_data_idwill result in errors or empty results. - Requesting more than 50 comments (
count >= 50) will cause the API to reject the request. - Incorrect
indexvalues (out of range for multi-article messages) may lead to no comments being returned. - Missing required parameters like
begin,count, ortypewill cause validation errors.
- Providing an invalid or expired
Error messages:
"未实现方法: comment.comment:list"indicates that the requested operation is not implemented or the resource/operation names are incorrect.- API errors related to authentication failures suggest checking the configured API credentials.
- Network or timeout errors require verifying connectivity to the WeChat API endpoint.
Resolutions:
- Ensure all required parameters are correctly set and within allowed ranges.
- Verify that the API credentials are valid and have necessary permissions.
- Use smaller
countvalues to avoid rejection. - Confirm the
msg_data_idcorresponds to a valid sent message with comments.
Links and References
- WeChat Official Account Platform Documentation
- WeChat Comment Management API Reference
- n8n Documentation on Creating Custom Nodes: https://docs.n8n.io/integrations/creating-nodes/