Zalo OA icon

Zalo OA

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

Overview

This node integrates with the Zalo Official Account (OA) API, enabling users to manage various aspects of their Zalo OA such as messaging, followers, tags, articles, and store products. Specifically, the "Tạo Sản Phẩm" (Create Product) operation allows users to create new products in their Zalo OA store by providing product details like name, price, description, code, images, and display status.

Common scenarios:

  • E-commerce businesses using Zalo OA to showcase and sell products can automate product creation.
  • Marketing teams can programmatically add new products to the Zalo OA store without manual entry.
  • Integration workflows that sync product data from other systems into Zalo OA.

Practical example:

  • Automatically create a new product on Zalo OA when a new item is added to an external inventory system, including uploading product images and setting its visibility status.

Properties

Name Meaning
Tên Sản Phẩm The name/title of the product to be created.
Giá Sản Phẩm The price of the product in Vietnamese Dong (VND).
Mô Tả Sản Phẩm A textual description of the product.
Mã Sản Phẩm The product code or SKU identifier.
URL Hình Ảnh Sản Phẩm URLs of product images, multiple URLs separated by commas.
Trạng Thái Sản Phẩm 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 create the product. This typically includes:

  • Confirmation of product creation with product ID and details.
  • Status messages indicating success or failure.
  • In case of errors, an error object with message, response details, and suggestions for troubleshooting.

No binary data output is produced by this operation.


Dependencies

  • Requires an API authentication token (access token) for Zalo OA API access.
  • Uses the Zalo OA API endpoint at https://openapi.zalo.me/v3.0/oa/store/product/create.
  • Requires proper OAuth credentials configured in n8n for Zalo OA.
  • The node uses the axios HTTP client and form-data package internally for requests.

Troubleshooting

  • Common issues:

    • Invalid or expired access token causing authentication failures.
    • Incorrect or missing required product parameters (e.g., missing product name or price).
    • Improperly formatted image URLs or inaccessible images.
    • Insufficient permissions granted to the access token for product management.
  • Error messages and resolutions:

    • "Error creating product: <message>": Check the provided product parameters for correctness and completeness.
    • API response errors may include HTTP status codes and detailed messages; verify the access token validity and OA permissions.
    • If image upload fails, ensure URLs are accessible and correctly formatted.
    • Suggestions often recommend verifying OA access rights and parameter formats.

Links and References


If you need summaries for other operations or resources, please provide their names.

Discussion