Sapo Trường Tùy Chỉnh icon

Sapo Trường Tùy Chỉnh

Quản lý trường tùy chỉnh trên Sapo

Bài Viết → Xóa Hàng Loạt

AI-generated

Overview

This node manages custom metafields on various resource types within the Sapo platform, such as articles, blogs, collections, customers, orders, pages, products, and product variants. Specifically, for the "Bài Viết" (Articles) resource with the "Xóa Hàng Loạt" (Bulk Delete) operation, it allows users to delete multiple metafields associated with a specific article in one action.

This bulk deletion is useful when cleaning up or resetting custom metadata fields on articles, for example, removing outdated tags, categories, or other custom attributes en masse without deleting them one by one.

Practical example:
A content manager wants to remove all custom metafields related to a promotional campaign from an article after the campaign ends. Using this node's bulk delete operation, they can specify filters like namespace or key to target only those relevant metafields and delete them all at once.

Properties

Name Meaning
ID Tài Nguyên The numeric ID of the article resource whose metafields are targeted for bulk deletion.
Thông Tin Bổ Sung Additional optional filters to narrow down which metafields to delete. Options include:
- Namespace: Filter metafields by their namespace string.
- Key: Filter metafields by their key string.
- Tạo Sau (Created After): Filter metafields created after this date/time.
- Tạo Trước (Created Before): Filter metafields created before this date/time.

Output

The output JSON contains the result of the bulk delete operation. Typically, it returns an object indicating success status:

{
  "success": true
}

This confirms that the specified metafields matching the filters were deleted successfully.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Sapo API via an API authentication credential configured in n8n.
  • The node depends on the internal SapoApiBase class to interact with the metafields endpoints of the Sapo API.
  • Proper permissions on the Sapo account to manage metafields on articles are necessary.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent article ID will cause the operation to fail.
    • Incorrect filter values (e.g., wrong namespace or key) may result in no metafields being deleted.
    • Insufficient API permissions or expired credentials will cause authentication errors.
  • Error messages:

    • Errors returned from the Sapo API will be surfaced with their message. For example, "Resource not found" indicates the article ID does not exist.
    • Network or authentication errors will indicate issues with API connectivity or credentials.
  • Resolution tips:

    • Verify the article ID exists and is correct.
    • Double-check filter parameters for typos or incorrect values.
    • Ensure the API credential is valid and has required scopes.
    • Use the node’s "Continue On Fail" option to handle errors gracefully during batch operations.

Links and References

Discussion