Actions11
Overview
This node manages product collections on the Sapo e-commerce platform. It supports various operations such as creating, updating, deleting, and retrieving both custom and smart collections, as well as managing products within these collections.
The "Xóa Bộ Sưu Tập Thông Minh" (Delete Smart Collection) operation specifically deletes a smart collection identified by its collection ID. This is useful when you want to remove an automatically generated collection based on rules from your store.
Practical examples:
- Automatically clean up outdated smart collections.
- Remove test or temporary smart collections created during store setup.
- Manage your product catalog by programmatically deleting collections that no longer apply.
Properties
| Name | Meaning |
|---|---|
| ID Bộ Sưu Tập | The numeric ID of the collection to delete. Required for this operation. |
Note: The property "ID Bộ Sưu Tập" corresponds to collectionId in code and must be provided to specify which smart collection to delete.
Output
The output JSON contains a single field indicating success:
{
"success": true
}
This confirms that the smart collection was successfully deleted.
Dependencies
- Requires an API key credential for authenticating with the Sapo platform.
- Depends on the internal
SapoApiBaseclass to interact with Sapo's collections API. - The node expects proper configuration of the Sapo API credentials in n8n.
Troubleshooting
Common issues:
- Providing an invalid or non-existent collection ID will likely cause an error.
- Missing or incorrect API credentials will prevent successful API calls.
- Network connectivity issues can cause timeouts or failures.
Error messages:
- Errors returned from the Sapo API will be caught and either thrown or returned as error objects depending on the node's "Continue On Fail" setting.
- Typical errors include authorization failures, not found errors if the collection ID does not exist, or validation errors if parameters are incorrect.
Resolution tips:
- Verify the collection ID exists before attempting deletion.
- Ensure API credentials are valid and have sufficient permissions.
- Use the node's error output to debug issues and adjust parameters accordingly.
Links and References
- Sapo API Documentation (general reference for Sapo API)
- n8n documentation on creating custom nodes