Overview
This node provides a generic interface to interact with the YouZanYun API, a cloud service platform. It handles authentication by obtaining and caching an access token using Redis, then makes API calls based on user-specified parameters. This node is useful for automating workflows that require querying or manipulating data via YouZanYun’s APIs without needing to implement token management manually.
Typical use cases include:
- Fetching product, order, or customer data from YouZanYun.
- Executing custom API requests to extend workflow capabilities.
- Integrating YouZanYun services into broader automation pipelines.
Properties
| Name | Meaning |
|---|---|
| API 名称 | The name of the YouZanYun API endpoint to call (e.g., "youzan.item.get"). |
| API 版本 | The version of the API to use, defaulting to "3.0.0". |
| 请求参数 | JSON string representing the parameters to send with the API request. |
Output
The node outputs an array of JSON objects, each corresponding to one input item processed. Each output object contains:
json: The parsed response data from the YouZanYun API call.- If the API call succeeds, this includes the main data returned by the API.
- If the API call fails and "Continue On Fail" is enabled, it returns an error message inside the
jsonfield.
No binary data output is produced by this node.
Dependencies
- YouZanYun SDK: Used to handle API token retrieval and making API calls.
- Redis: Used as a cache store for the access token to avoid redundant authentication requests.
- Credentials:
- An API key credential containing
grantId,clientId, andclientSecretfor authenticating with YouZanYun. - A Redis credential specifying connection details (
host,port,password,database) for token caching.
- An API key credential containing
Troubleshooting
- Redis Connection Failure: If the node cannot connect to Redis, it throws an error indicating the failure. Ensure Redis credentials are correct and the Redis server is accessible.
- Token Expiry Issues: The node automatically refreshes tokens when expired. If token retrieval fails, check API credentials and network connectivity.
- API Request Errors: If the YouZanYun API returns an error, the node throws an error with the API's error message. Enable "Continue On Fail" to capture errors per item instead of stopping execution.
- Invalid JSON in Parameters: The
paramsproperty must be valid JSON. Malformed JSON will cause parsing errors. - Logging: The node logs token refresh events and API responses, which can help diagnose issues.