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 detailed information about a specific product listed in the OA's store. It is useful for scenarios where you need to fetch up-to-date product details such as name, price, description, and other metadata directly from Zalo OA within an n8n workflow.

Practical examples include:

  • Automatically fetching product info to display or process in subsequent workflow steps.
  • Synchronizing product data between Zalo OA and other systems.
  • Triggering actions based on product details retrieved from Zalo OA.

Properties

Name Meaning
ID Sản Phẩm The unique identifier of the product whose information you want to retrieve from Zalo OA.

Output

The node outputs a JSON object containing the product information returned by the Zalo OA API. This typically includes fields such as product ID, name, price, description, category, photos, status, and other relevant product metadata.

If an error occurs during the API call, the output JSON will contain an error flag set to true, an error message, the raw API response if available, and a suggestion field with guidance on how to resolve the issue.

The node does not output binary data for this operation.

Dependencies

  • Requires a valid API authentication token (access token) for the Zalo Official Account API.
  • The node expects proper OAuth credentials configured in n8n to authenticate requests.
  • Network access to the Zalo OA API endpoint: https://openapi.zalo.me/v3.0/oa/store/product/getproduct.
  • Uses the Axios HTTP client library internally to make REST API calls.

Troubleshooting

Common Issues

  • Invalid or expired access token: The API call will fail if the access token is missing, invalid, or expired.
  • Incorrect product ID: If the provided product ID does not exist or is malformed, the API will return an error.
  • Insufficient permissions: The connected OA account must have the necessary permissions to access product information.
  • Network issues: Connectivity problems can cause request failures.

Error Messages and Resolutions

  • "Error getting product info: <error message>": Indicates failure in calling the product info API. Check the product ID and ensure the access token is valid.
  • Response status codes like 401 or 403 suggest authentication or permission issues; verify OAuth credentials and OA permissions.
  • If the response contains a note about API version or endpoint deprecation, check for updates in the Zalo OA API documentation.

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