WeChat Enhanced icon

WeChat Enhanced

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

Overview

The node "WeChat Enhanced" provides comprehensive integration with various WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically, for the Official Account resource and the Get User Info operation, this node retrieves detailed information about a user identified by their Open ID on a WeChat Official Account.

This functionality is useful in scenarios where you want to personalize interactions with users, verify user details, or gather profile data for marketing, customer support, or analytics purposes. For example, after a user interacts with your Official Account, you can fetch their profile info such as nickname, gender, location, and subscription status to tailor messages or segment your audience.

Properties

Name Meaning
Open ID The unique identifier of the user within the Official Account. This is required to specify which user's information to retrieve.

Output

The output JSON contains the user information returned from the WeChat Official Account API. This typically includes fields such as:

  • openid: The user's Open ID.
  • nickname: The user's nickname.
  • sex: Gender of the user.
  • province, city, country: Location details.
  • headimgurl: URL of the user's avatar.
  • subscribe: Subscription status to the Official Account.
  • Other profile-related fields as provided by the WeChat API.

The exact structure depends on the WeChat API response but generally follows the standard user info schema defined by WeChat Official Accounts.

No binary data output is involved in this operation.

Dependencies

  • Requires an active subscription and valid API key for the external "N8N Tools API" service used for validation.
  • Needs credentials for accessing WeChat Official Account APIs (such as access tokens), managed internally by the node.
  • The node uses an internal helper class (WeChatApi) to interact with WeChat's Official Account endpoints.
  • Proper configuration of these credentials and API keys in n8n is necessary for successful execution.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential configured in n8n is correct and active.
  • Unsupported operation error: Ensure that the selected resource is "Official Account" and the operation is "Get User Info". Using unsupported combinations will cause errors.
  • Missing or incorrect Open ID: The Open ID parameter is mandatory. Providing an empty or invalid Open ID will result in failure to retrieve user info.
  • API rate limits or network issues: As the node relies on external API calls, transient network problems or hitting API rate limits may cause errors. Retrying or checking API usage quotas might help.
  • JSON parsing errors: Some operations require JSON input; ensure that any JSON parameters are correctly formatted.

Links and References

Discussion