Overview
This node manages products on the Sapo e-commerce platform. It supports creating, updating, retrieving, listing, counting, and deleting products. Typical use cases include automating product catalog management, syncing product data from other systems, or bulk updating product information.
For example:
- Creating a new product with specific attributes.
- Updating an existing product’s details.
- Fetching detailed information about a single product.
- Listing multiple products with optional filters and pagination.
- Counting total products in the store.
- Deleting a product by its ID.
Properties
| Name | Meaning |
|---|---|
| Thao Tác (operation) | The action to perform on products. Options: Create, Update, Get, Get Many, Delete, Count. |
| ID Sản Phẩm (productId) | The unique numeric identifier of the product (required for get, update, delete operations). |
| Trả Về Tất Cả (returnAll) | Whether to return all products when listing or limit the number of results. Boolean true/false. |
| Giới Hạn (limit) | Maximum number of products to return when listing (used if returnAll is false). Minimum 1. |
| Thông Tin Bổ Sung (additionalFields) | Additional filters for listing products, such as created or updated date ranges. |
| Dữ Liệu (data) | JSON object containing product data to send to Sapo when creating or updating a product. Required for create and update operations. |
Output
The node outputs an array with one item containing a json field. This field holds the response from the Sapo API corresponding to the operation performed:
- For create and update, it returns the created or updated product data.
- For get, it returns the detailed product information.
- For getMany, it returns a list of products, possibly filtered and limited.
- For count, it returns an object with a
countproperty indicating the total number of products. - For delete, it returns
{ success: true }upon successful deletion. - In case of errors (if "Continue On Fail" is enabled), it returns an object with an
errorproperty describing the issue.
The node does not output binary data.
Dependencies
- Requires an active connection to the Sapo API via an API key credential configured in n8n.
- Uses the internal Sapo API base class to interact with product endpoints.
- No additional external dependencies beyond the Sapo API and n8n environment.
Troubleshooting
Common issues:
- Invalid or missing product ID when required (get, update, delete).
- Malformed JSON in the
dataproperty for create/update operations. - API authentication failures due to incorrect or expired credentials.
- Exceeding API rate limits or network connectivity problems.
Error messages:
- Errors returned from the Sapo API are surfaced with their message and stack trace.
- If "Continue On Fail" is disabled, the node execution will stop on error.
- To resolve, verify input parameters, ensure valid credentials, and check API status.
Links and References
- Sapo API Documentation (official API docs for product management)
- n8n documentation on creating custom nodes