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ài Viết → Lấy Danh Sách
AI-generatedOverview
This node manages custom metafields on various resource types within the Sapo platform. It allows users to create, retrieve, update, delete, count, validate, and bulk delete metafields associated with resources such as articles, blogs, collections, customers, orders, pages, products, and product variants.
For the specific operation "Lấy Danh Sách" (Get Many) on the resource "Bài Viết" (Articles), the node fetches a list of metafields attached to a particular article identified by its resource ID. Users can choose to retrieve all metafields or limit the number returned, and apply additional filters like namespace, key, or creation date ranges.
Practical examples:
- Fetching all custom metafields for an article to display or process metadata such as SEO tags or custom attributes.
- Retrieving a limited set of metafields filtered by namespace or key to integrate with other systems or workflows.
- Using date filters to get metafields created within a specific timeframe for auditing or reporting purposes.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The numeric ID of the article resource whose metafields are being queried. |
| Trả Về Tất Cả | Boolean option to return all metafields or only up to a specified limit. |
| Giới Hạn | Maximum number of metafields to return when not returning all. Minimum value is 1. |
| Thông Tin Bổ Sung | Additional optional filters to refine the metafield list: |
| - Namespace | Filter metafields by their namespace string. |
| - Key | Filter metafields by their key string. |
| - Tạo Sau | Filter metafields created after this date/time. |
| - Tạo Trước | Filter metafields created before this date/time. |
Output
The output is an array containing one object with a json property holding the retrieved metafields data. The structure depends on the API response but generally includes:
- A list of metafield objects, each containing details such as:
id: Metafield identifiernamespace: The metafield's namespacekey: The metafield's keyvalue: The stored valuevalue_type: Type of the value (e.g., string)description: Description of the metafieldcreated_at,updated_at: Timestamps for creation and last update
No binary data is output by this node.
Dependencies
- Requires an active connection to the Sapo API via an API authentication credential configured in n8n.
- Uses the internal
SapoApiBaseclass to interact with metafield endpoints. - No additional external dependencies beyond the Sapo API and n8n environment.
Troubleshooting
Common issues:
- Invalid or missing resource ID will cause the API call to fail.
- Incorrect API credentials or expired tokens will result in authentication errors.
- Using filters that do not match any metafields will return empty results.
- Requesting too many records without enabling "return all" may truncate results.
Error messages:
- Errors from the Sapo API are caught and reported with their message.
- If the node is set to continue on failure, errors appear in the output JSON under an
errorfield. - Common error resolution steps include verifying resource IDs, checking API credentials, and adjusting filter parameters.
Links and References
- Sapo API Documentation (general reference for metafield management)
- n8n documentation on creating custom nodes