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, products, categories, and orders. Specifically, the "Cập Nhật Danh Mục" (Update Category) operation allows updating an existing product category in the OA store by modifying its ID, name, description, image URL, and display status.

Common scenarios for this node include:

  • Updating product categories in a Zalo OA online store to reflect changes in inventory or marketing.
  • Managing category visibility to control which categories customers see.
  • Automating updates to category information based on external data sources or workflows.

Practical example:

  • A business wants to rename a product category from "Summer Collection" to "Summer 2024" and update its description and image. Using this node's update category operation, they can automate this update directly via the Zalo OA API without manual intervention.

Properties

Name Meaning
ID Danh Mục The unique identifier of the category to update (required).
Tên Danh Mục The new name for the category.
Mô Tả Danh Mục The new description text for the category.
URL Hình Ảnh Danh Mục The new image URL representing the category.
Trạng Thái Danh Mục The new display status of the category; options are: "Hiển Thị" (show), "Ẩn" (hide).

Output

The node outputs a JSON object containing the response from the Zalo OA API after attempting to update the category. This typically includes success confirmation or error details.

Example output structure:

{
  "error": false,
  "message": "Category updated successfully",
  "data": {
    "id": "category_id",
    "name": "Updated Category Name",
    "description": "Updated description",
    "status": "show"
  }
}

If an error occurs, the output JSON will contain fields like error: true, an error 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 Zalo Official Account API access token credential configured in n8n.
  • Uses the Zalo OA API endpoint at https://openapi.zalo.me/v3.0/oa/store/category/update.
  • Requires proper permissions granted to the access token to update store categories.

Troubleshooting

  • Common issues:

    • Invalid or expired access token leading to authentication errors.
    • Incorrect or missing category ID causing the API to fail to find the category.
    • Insufficient permissions on the Zalo OA app to perform category updates.
    • Malformed input data such as invalid URLs or unsupported characters.
  • Error messages and resolutions:

    • "Error updating category: <message>": Check that the category ID is correct and exists.
    • API response errors indicating permission denied: Ensure the access token has the required scopes.
    • Network or timeout errors: Verify network connectivity and API availability.
    • Validation errors from the API about input fields: Confirm all required fields are provided and valid.

Links and References

Discussion