Zalo OA icon

Zalo OA

Tương tác với Zalo Official Account API

Overview

This node interacts with the Zalo Official Account (OA) API to retrieve a list of products associated with the OA. It is useful for scenarios where you want to programmatically fetch product data from your Zalo OA store, such as displaying product catalogs in workflows, syncing product information with other systems, or automating inventory checks.

For example, you might use this node to:

  • Fetch the first 10 products starting from the beginning of the product list.
  • Paginate through products by adjusting the offset and count parameters.
  • Integrate Zalo OA product data into CRM or e-commerce platforms.

Properties

Name Meaning
Vị Trí Bắt Đầu (offset) The starting position (index) in the product list from which to begin fetching products. Default is 0.
Số Lượng (count) The number of products to retrieve from the starting position. Default is 10.

Output

The node outputs JSON data containing the response from the Zalo OA API's product list endpoint. The structure typically includes:

  • data: An array of product objects, each representing a product with its details.
  • Pagination info such as total count, offset, and limit.
  • Additional metadata or messages related to the request.

Each product object may include fields like product ID, name, description, price, photos, category, status, and other relevant attributes as provided by the Zalo OA API.

The node does not output binary data for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Zalo OA API.
  • Needs proper OAuth tokens (access token and refresh token) for the Zalo OA account.
  • The node uses the official Zalo OA API endpoints (https://openapi.zalo.me/v3.0/oa/store/product/getproduct).
  • Network access to Zalo's API servers is required.
  • No additional external libraries beyond those bundled with n8n are needed.

Troubleshooting

  • Common Issues:

    • Invalid or expired access tokens can cause authentication failures.
    • Incorrect offset or count values may result in empty or partial results.
    • Insufficient permissions on the Zalo OA account can lead to authorization errors.
    • Network connectivity issues can prevent API calls from succeeding.
  • Error Messages:

    • "Error getting product list:" followed by an error message indicates failure in fetching the product list. Check the access token validity and API permissions.
    • HTTP response status codes like 401 (Unauthorized) suggest token or permission problems.
    • Rate limiting or quota exceeded errors may occur if too many requests are made in a short time.
  • Resolutions:

    • Ensure that the API credentials and tokens are correctly configured and valid.
    • Verify that the Zalo OA account has granted necessary permissions for product management.
    • Adjust offset and count parameters within valid ranges.
    • Review network settings and firewall rules to allow outbound API requests.
    • Consult Zalo OA API documentation for updated endpoint usage and limits.

Links and References


Note: This summary is based solely on static analysis of the provided source code and property definitions without executing the code.

Discussion