Zalo OA icon

Zalo OA

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

Overview

The node interacts with the Zalo Official Account (OA) API, specifically enabling management of products within a Zalo OA store. The "Cập Nhật Sản Phẩm" (Update Product) operation allows users to update details of an existing product in their Zalo OA store by providing the product ID and new values for various product attributes.

This operation is useful for store owners or managers who want to keep their product catalog up-to-date directly from n8n workflows without manually accessing the Zalo OA platform. For example, you can automate price updates, change product descriptions, or modify product visibility status based on external data sources or events.

Properties

Name Meaning
ID Sản Phẩm (productId) The unique identifier of the product to update (required).
Tên Sản Phẩm (name) New name of the product.
Giá Sản Phẩm (price) New price of the product in Vietnamese Dong (VND).
Mô Tả Sản Phẩm (description) New description text for the product.
Mã Sản Phẩm (code) New code or SKU for the product.
URL Hình Ảnh Sản Phẩm (photos) New image URLs for the product; multiple URLs separated by commas.
Trạng Thái Sản Phẩm (status) New display status of the product; options are "Hiển Thị" (show) or "Ẩn" (hide).

Output

The output JSON contains the response from the Zalo OA API after attempting to update the product. This typically includes:

  • Confirmation of the update success or failure.
  • Updated product details or error messages if the update failed.

If an error occurs, the output JSON will include an error flag set to true, a descriptive message, and possibly additional response data from the API to help diagnose the issue.

The node does not output binary data for this operation.

Dependencies

  • Requires an active connection to the Zalo Official Account API via an API access token credential configured in n8n.
  • Uses the Zalo OA API endpoint at https://openapi.zalo.me/v3.0/oa/store/product/update.
  • The API access token must have sufficient permissions to update product information in the Zalo OA store.

Troubleshooting

  • Common Issues:

    • Invalid or expired access token leading to authentication errors.
    • Incorrect or non-existent product ID causing update failures.
    • Improperly formatted photo URLs or missing required fields.
    • Insufficient permissions granted to the API token.
  • Error Messages:

    • "Error updating product: <message>": Indicates a failure returned by the API. Check the product ID and parameters.
    • API response may include HTTP status codes and detailed error info in the response field.
  • Resolutions:

    • Verify that the product ID exists and is correct.
    • Ensure the access token is valid and has the necessary scopes.
    • Confirm that all input fields follow the expected formats.
    • Review API documentation for any changes or additional requirements.

Links and References

Discussion