Overview
This node integrates with the Sapo platform to manage products. It supports operations such as creating, retrieving, updating, deleting, counting, and listing products on Sapo. This node is useful for automating product management workflows, syncing product data between systems, or bulk processing product information.
For example:
- Automatically create new products in Sapo when added in an external system.
- Retrieve detailed product information by ID for reporting or further processing.
- Update product details based on changes from another source.
- Delete products that are no longer available.
- Count total products for inventory monitoring.
- List multiple products with optional filters and limits.
Properties
| Name | Meaning |
|---|---|
| Thao Tác | Operation to perform: create, get, getMany, update, delete, or count. |
| ID Sản Phẩm | The numeric ID of the product (required for get, update, and delete operations). |
| Trả Về Tất Cả | Boolean flag to return all results or limit them (only for getMany). |
| Giới Hạn | Maximum number of products to return when not returning all (only for getMany). |
| Thông Tin Bổ Sung | Additional filter fields for listing products, including creation and update date ranges. |
| Dữ Liệu | JSON object containing product data to send when creating or updating a product. |
Output
The node outputs an array with one item containing a json field:
- For
create,get,update, andgetManyoperations, thejsoncontains the product data returned by the Sapo API. - For
delete, the output is{ success: true }indicating successful deletion. - For
count, the output is{ count: <number> }representing the total number of products. - In case of errors (if "Continue On Fail" is enabled), the output includes
{ error: <error message> }.
No binary data is output by this node.
Dependencies
- Requires an API key credential for authenticating with the Sapo API.
- Uses an internal helper class to interact with the Sapo products API endpoints.
- No additional environment variables are explicitly required beyond the API credential.
Troubleshooting
Common issues:
- Invalid or missing product ID when performing
get,update, ordeleteoperations will cause errors. - Providing malformed JSON in the
Dữ Liệuproperty forcreateorupdatecan lead to API rejections. - Network or authentication failures may result in connection errors.
- Invalid or missing product ID when performing
Error messages:
- Errors from the Sapo API are surfaced with their message and stack trace unless "Continue On Fail" is enabled.
- To resolve errors, verify the correctness of input parameters, ensure valid API credentials, and check network connectivity.
Links and References
- Sapo API Documentation (official resource for API details)
- n8n documentation on creating custom nodes