WeChat Enhanced icon

WeChat Enhanced

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

Overview

The node provides enhanced integration with WeChat services, supporting multiple resources including Mini Programs, Official Accounts, WeChat Pay, and others. Specifically for the Mini Program resource and the Get Analytics Data operation, this node fetches analytics data for a WeChat Mini Program within a specified date range.

This operation is useful for developers and marketers who want to retrieve performance metrics and user engagement statistics of their Mini Programs over a given period. For example, it can be used to monitor daily active users, page views, or other analytic indicators provided by WeChat's Mini Program platform.

Practical scenarios include:

  • Generating reports on Mini Program usage trends.
  • Triggering automated workflows based on analytics thresholds.
  • Integrating Mini Program analytics into broader business intelligence dashboards.

Properties

Name Meaning
Start Date The start date for the analytics data query (required). Specifies the beginning of the date range for which analytics data will be retrieved.
End Date The end date for the analytics data query (required). Specifies the end of the date range for which analytics data will be retrieved.

Output

The output is a JSON object containing the analytics data returned from the WeChat Mini Program API for the specified date range. The exact structure depends on the WeChat API response but typically includes metrics such as user visits, page views, session durations, and other relevant analytics.

No binary data output is indicated for this operation.

Example output JSON might look like:

{
  "ref_date": "2024-01-01",
  "visit_uv_new": 123,
  "visit_uv": 456,
  "visit_session": 789,
  "stay_time_uv": 300,
  "stay_time_session": 400,
  "visit_pv": 1000,
  ...
}

Dependencies

  • Requires an active subscription and valid API key credential for the external "N8N Tools API" service that acts as a proxy/validation layer for WeChat API calls.
  • Requires credentials for authenticating with WeChat Mini Program APIs (e.g., access tokens).
  • The node internally uses a helper class (WeChatApi) to interact with WeChat endpoints.
  • Proper configuration of these credentials in n8n is necessary before use.

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 is correctly configured and active.
  • Unsupported operation error: This occurs if an unsupported operation name is passed; ensure the operation is exactly "getAnalyticsData" for Mini Program resource.
  • Date parameter errors: Both start and end dates are required. Missing or incorrectly formatted dates may cause request failures.
  • API rate limits or network issues: As the node relies on external API calls, transient network errors or rate limiting by WeChat or the proxy API may occur. Retrying after some time or checking API quotas may help.
  • JSON parsing errors: If any input parameters are expected as JSON strings, ensure they are well-formed.

Links and References


This summary focuses exclusively on the "Mini Program" resource and "Get Analytics Data" operation as requested.

Discussion