WeChat Enhanced icon

WeChat Enhanced

WeChat Enhanced Node - Suporte completo para Mini Programs, Official Accounts, WeChat Pay e WeChat Work

Overview

The "WeChat Enhanced" node integrates with various WeChat services, including Official Accounts, Mini Programs, WeChat Pay, and WeChat Work. Specifically, for the Official Account resource and the Get User List operation, this node retrieves a list of users who follow the official account. It supports pagination through the "Next Open ID" parameter to fetch subsequent batches of users.

This operation is beneficial when managing followers of a WeChat Official Account, enabling workflows such as audience analysis, targeted messaging, or syncing user data with other systems.

Practical example:
A marketing automation workflow could use this node to periodically fetch new followers from an Official Account and add them to a CRM system for personalized campaigns.


Properties

Name Meaning
Next Open ID The Open ID to start fetching the next page of users (used for pagination). If empty, fetching starts from the beginning.

Output

The node outputs JSON data representing the user list retrieved from the WeChat Official Account API. The structure typically includes:

  • A list/array of user Open IDs.
  • A next_openid field indicating the Open ID to be used for the next page request if more users exist.
  • Possibly a total count of users.

Example output JSON snippet (conceptual):

{
  "total": 1234,
  "count": 1000,
  "data": {
    "openid": [
      "OPENID1",
      "OPENID2",
      "... more openids ..."
    ]
  },
  "next_openid": "NEXT_OPENID_VALUE"
}

This allows workflows to handle pagination by passing the next_openid value back into the "Next Open ID" input property for subsequent executions.


Dependencies

  • Requires an active subscription and valid API key credential for the external "N8N Tools API" service that validates usage before calling WeChat APIs.
  • Requires credentials for authenticating with WeChat Official Account APIs (e.g., access tokens).
  • The node internally uses a helper class (WeChatApi) to interact with WeChat endpoints.
  • No direct environment variables are mentioned; all credentials are managed via n8n's credential system.

Troubleshooting

  • Invalid subscription or API key error:
    If the node throws an error about invalid subscription or API key, verify that the API key credential configured in n8n is correct and active.

  • Unsupported operation error:
    If the operation name is incorrect or not supported, the node will throw an error. Ensure the operation is set to "Get User List" under the Official Account resource.

  • Pagination issues:
    If the "Next Open ID" is incorrect or expired, the user list may not paginate correctly. Use the next_openid returned in the output to continue fetching users.

  • API rate limits or network errors:
    As with any API integration, network issues or rate limiting by WeChat can cause failures. Implement retry logic or error handling in your workflow.


Links and References

Discussion