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
Trang → Lấy Danh Sách
AI-generatedOverview
This node manages custom metafields on various resources within the Sapo platform, specifically here focusing on the "Trang" (Page) resource. It allows users to retrieve a list of metafields associated with a specific page by its ID. This is useful for scenarios where you want to programmatically access additional metadata attached to pages, such as SEO tags, custom settings, or other structured data that extends the default page properties.
Practical examples include:
- Fetching all custom metafields for a given page to display or process them in an automation workflow.
- Filtering metafields by namespace or key to extract specific metadata.
- Limiting the number of results returned or retrieving all metafields depending on the use case.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The unique numeric identifier of the page resource whose metafields are being queried. |
| Trả Về Tất Cả | Boolean option to return all metafields without limit or only up to a specified maximum number. |
| Giới Hạn | Maximum number of metafield results to return when not returning all. Minimum value is 1. |
| Thông Tin Bổ Sung | Additional optional filters to refine the metafield query: |
| - 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 JSON contains the list of metafields matching the query parameters. Each metafield object typically includes fields such as namespace, key, value, value type, description, and timestamps, representing the custom metadata attached to the page.
Example output structure (simplified):
[
{
"namespace": "inventory",
"key": "warehouse_location",
"value": "A-12",
"value_type": "string",
"description": "Storage location in warehouse",
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-02T00:00:00Z"
},
...
]
No binary data output is involved in 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
SapoApiBaseclass to handle API requests related to metafields. - Proper permissions on the Sapo account to read metafields for the specified page resource.
Troubleshooting
Common issues:
- Invalid or missing page ID (
resourceId) will cause the API call to fail. - Insufficient permissions or invalid API credentials can result in authorization errors.
- Using filters (namespace, key, date ranges) incorrectly may lead to empty results.
- Requesting too many records without enabling "return all" might truncate results unexpectedly.
- Invalid or missing page ID (
Error messages:
- Errors from the Sapo API will be surfaced with their message; typical errors include "Resource not found" if the page ID does not exist.
- Network or authentication errors will indicate connectivity or credential problems.
Resolution tips:
- Verify the page ID exists and is correct.
- Check API credentials and permissions.
- Adjust filters carefully and test with minimal filtering first.
- Use "Trả Về Tất Cả" (returnAll) option when expecting large datasets.
Links and References
- Sapo API Documentation (general reference for metafield endpoints)
- n8n documentation on creating custom nodes