Actions33
- Mini Program Actions
- WeChat Pay Actions
- Official Account Actions
- WeChat Work Actions
Overview
The node provides enhanced integration with WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically, for the Mini Program resource and the Get Analytics Data operation, it retrieves analytics data for a WeChat Mini Program within a specified date range.
This operation is useful for developers and marketers who want to analyze user engagement, performance metrics, or other analytic insights of their Mini Program over a custom time period. For example, you can use this node to fetch daily active users, page views, or retention statistics between two dates to monitor growth or identify trends.
Properties
| Name | Meaning |
|---|---|
| Start Date | Analytics start date (required) |
| End Date | Analytics end date (required) |
These properties define the date range for which the Mini Program analytics data will be fetched.
Output
The output is a JSON object containing the analytics data returned by the WeChat API for the specified date range. The exact structure depends on the WeChat Mini Program analytics API response but typically includes metrics such as user visits, page views, session durations, and other relevant statistics.
No binary data output is indicated for this operation.
Example output JSON (conceptual):
{
"ref_date": "2024-06-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 API key credential for the external N8N Tools API service that acts as a proxy or middleware to interact with WeChat APIs.
- The node attempts to validate the subscription and API key before making requests.
- The underlying calls are made through a helper class (
WeChatApi) that handles communication with WeChat's Mini Program API endpoints. - Proper configuration of credentials in n8n is necessary to authenticate and authorize API requests.
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 is correctly configured and active.
- Unsupported operation error: This node only supports defined operations; ensure the operation name matches exactly "getAnalyticsData" for Mini Program resource.
- Date format issues: Ensure that the Start Date and End Date inputs are valid ISO date strings or compatible datetime formats accepted by the node.
- API rate limits or network errors: These may cause request failures; check network connectivity and WeChat API usage limits.
- Credential not found warning: If no credentials are provided, the node skips validation but subsequent API calls may fail due to lack of authentication.
Links and References
- WeChat Mini Program Analytics Documentation (official WeChat docs)
- n8n Documentation - Creating Custom Nodes
- WeChat Official API Reference
This summary focuses exclusively on the Mini Program resource and the Get Analytics Data operation as requested.