Actions11
Overview
This node integrates with the AliExpress Affiliate API to perform various affiliate-related operations. Specifically, for the "Generate Affiliate Link" operation, it converts a given original product or promotion link into an affiliate link that includes tracking information and commission details. This is useful for affiliates who want to promote AliExpress products and earn commissions by sharing customized affiliate links.
Common scenarios include:
- Generating affiliate links from standard product URLs to share on websites, blogs, or social media.
- Creating special "hot product" affiliate links that may have higher commission rates.
- Tracking affiliate performance using custom tracking IDs embedded in the generated links.
Example: An affiliate marketer inputs a normal AliExpress product URL and selects the promotion link type as "normal". The node returns an affiliate link that the marketer can use to track referrals and earn commissions.
Properties
| Name | Meaning |
|---|---|
| Promotion Link Type | Promotion link type: 0 for normal link with standard commission, 2 for hot link with hot product commission |
| Source Values | Original link or value (e.g., the product URL or identifier to convert into an affiliate link) |
| Tracking ID | Optional tracking ID to identify and track affiliate traffic; if not provided, uses default credential tracking ID |
Output
The node outputs an array of JSON objects, each containing the response body from the AliExpress Affiliate API call. For the "Generate Affiliate Link" operation, the output JSON will include the generated affiliate link and related metadata returned by the API.
Example output structure (simplified):
{
"affiliate_link": "https://s.click.aliexpress.com/e/_someAffiliateLink",
"promotion_link_type": 0,
"tracking_id": "yourTrackingId",
...
}
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for the AliExpress Affiliate API, including an API key, API secret, and optionally a default tracking ID.
- Uses the AliExpress SDK client internally to communicate with the AliExpress Affiliate API endpoint at
https://api-sg.aliexpress.com/sync. - The node expects valid credentials configured in n8n to authenticate API requests.
Troubleshooting
- Missing Credentials: If the API key or secret is missing, the node throws an error "Missing required credential fields". Ensure the API credentials are correctly set up in n8n.
- No Credentials Returned: If no credentials are found, the node throws "No credentials returned!" error. Verify the credential configuration.
- API Response Errors: If the API response does not contain expected data, the node throws "Unexpected API response structure".
- Network or API Errors: Errors during API calls are logged and, depending on the node's "Continue On Fail" setting, either cause the workflow to fail or return an error object in the output.
- Invalid Input Parameters: Providing invalid or empty source values or unsupported promotion link types may result in API errors. Validate input parameters before execution.