Sapo Sản Phẩm icon

Sapo Sản Phẩm

Quản lý sản phẩm trên Sapo

Overview

This node manages products on the Sapo e-commerce platform. It allows users to create, retrieve, update, delete, count, and list products programmatically within an n8n workflow. This is useful for automating product management tasks such as syncing inventory, updating product details in bulk, or integrating Sapo product data with other systems.

For example, you can use this node to:

  • Update product information like price or description when your inventory changes.
  • Retrieve detailed product data for reporting or analytics.
  • Create new products automatically from another system.
  • Delete discontinued products from your store.

Properties

Name Meaning
Thao Tác The operation to perform: Cập Nhật (update), Count, Lấy Chi Tiết (get), Lấy Danh Sách (getMany), Tạo Mới (create), Xóa (delete)
ID Sản Phẩm The unique numeric ID of the product (required for get, update, delete operations)
Trả Về Tất Cả Boolean flag indicating whether to return all results or limit the number (for getMany)
Giới Hạn Maximum number of results to return when not returning all (for getMany)
Thông Tin Bổ Sung Additional optional filters for listing products, such as creation or update date ranges
Dữ Liệu JSON object containing the product data to send to Sapo (required for create and update)

Output

The node outputs a JSON object representing the result of the performed operation:

  • For create and update, it returns the created or updated product data.
  • For get, it returns the detailed data of the specified product.
  • For getMany, it returns a list of products matching the criteria.
  • For delete, it returns a success confirmation object { success: true }.
  • For count, it returns an object with the total count of products { count: number }.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Sapo platform.
  • Depends on the internal Sapo API base class to handle HTTP requests to Sapo's product endpoints.
  • Needs proper configuration of the Sapo API credentials in n8n.

Troubleshooting

  • Common issues:

    • Invalid or missing product ID when performing get, update, or delete operations will cause errors.
    • Malformed JSON in the "Dữ Liệu" property may lead to request failures.
    • Insufficient permissions or invalid API credentials will result in authentication errors.
    • Request limits or API rate limiting by Sapo could cause temporary failures.
  • Error messages:

    • Errors are caught and either thrown or returned as error objects depending on the node’s "Continue On Fail" setting.
    • Typical error messages include network errors, invalid parameters, or authorization failures.
  • Resolution tips:

    • Verify that the product ID exists and is correct.
    • Ensure the JSON data sent in "Dữ Liệu" is valid and matches Sapo's expected schema.
    • Check API credentials and permissions.
    • Use "Continue On Fail" cautiously to handle partial failures gracefully.

Links and References

Discussion