Actions72
- Bài Viết Actions
- Blog Actions
- Bộ Sưu Tập Actions
- Khách Hàng Actions
- Đơn Hàng Actions
- Trang Actions
- Sản Phẩm Actions
- Biến Thể Sản Phẩm Actions
Bộ Sưu Tập → Xóa Hàng Loạt
AI-generatedOverview
This node manages custom metafields on various resource types within the Sapo platform, such as collections, products, orders, customers, and more. Specifically, the "Xóa Hàng Loạt" (Bulk Delete) operation allows users to delete multiple metafields associated with a particular resource ID in one action, optionally filtered by additional criteria like namespace, key, or creation date range.
Common scenarios for this node include cleaning up outdated or irrelevant custom fields from a collection of resources, automating bulk metadata management, or maintaining data hygiene in large catalogs or customer databases.
For example, a user might want to remove all metafields under a specific namespace from a product collection that were created before a certain date, streamlining their metadata structure efficiently.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The numeric ID of the resource (e.g., a collection) whose metafields are targeted for bulk deletion. |
| Thông Tin Bổ Sung | Additional optional filters to narrow down which metafields to delete. Includes: |
| - Namespace: Filter metafields by their namespace string. | |
| - Key: Filter metafields by their key string. | |
| - Tạo Sau (Created After): Only include metafields created after this datetime. | |
| - Tạo Trước (Created Before): Only include metafields created before this datetime. |
Output
The output JSON contains the result of the bulk delete operation. It typically returns an object indicating success status:
{
"success": true
}
If an error occurs and the node is set to continue on failure, the output will contain an error message instead:
{
"error": "Error message describing what went wrong"
}
No binary data is produced by this operation.
Dependencies
- Requires an API authentication credential for the Sapo platform.
- Depends on the internal
SapoApiBaseclass to interact with Sapo's metafield API endpoints. - The node expects proper configuration of the Sapo API credentials within n8n.
Troubleshooting
Common Issues:
- Providing an invalid or non-existent resource ID will cause the operation to fail.
- Incorrect or missing API credentials will prevent successful communication with the Sapo API.
- Using filters in "Thông Tin Bổ Sung" that do not match any metafields will result in no deletions but still return success.
Error Messages:
- Errors returned from the Sapo API (e.g., authorization errors, resource not found) will be surfaced in the node's output if "Continue On Fail" is enabled.
- If the node throws an error without continuing, check the API credentials and resource IDs for correctness.
Links and References
- Sapo Platform API Documentation (general reference for metafield management)
- n8n Documentation on Creating Custom Nodes