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
Sản Phẩm → Lấy Chi Tiết
AI-generatedOverview
This node manages custom metafields on various resource types within the Sapo platform, including products. Specifically, for the "Sản Phẩm" (Product) resource and the "Lấy Chi Tiết" (Get Detail) operation, it retrieves detailed information about a specific custom metafield associated with a product.
Common scenarios where this node is useful include:
- Fetching metadata details for a product to display or process additional custom attributes.
- Integrating product metafield data into workflows for inventory management, reporting, or synchronization with other systems.
- Validating or auditing custom fields attached to products.
For example, if you want to get the warehouse location or any other custom attribute stored as a metafield for a product identified by its ID, this node can retrieve that information.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The numeric ID of the product resource for which the metafield detail is requested. |
| ID Trường Tùy Chỉnh | The numeric ID of the specific custom metafield to retrieve details for. Required for "get", "update", and "delete" operations. |
Output
The output JSON contains the detailed information of the requested metafield for the specified product. This typically includes fields such as namespace, key, value, value type, description, and other metadata related to the custom field.
Example output structure (simplified):
{
"id": 123,
"namespace": "inventory",
"key": "warehouse_location",
"value": "A-12",
"value_type": "string",
"description": "Storage location in warehouse",
"owner_type": "product",
"owner_id": 456
}
No binary data output is produced by this node.
Dependencies
- Requires an API authentication credential for the Sapo platform to access metafield data.
- Depends on the internal
SapoApiBaseclass to communicate with the Sapo API. - The node expects proper configuration of the Sapo API credentials within n8n.
Troubleshooting
Common issues:
- Providing an invalid or non-existent product ID or metafield ID will result in errors or empty responses.
- Missing or incorrect API credentials will cause authentication failures.
- Attempting to get metafield details without specifying the required metafield ID will cause validation errors.
Error messages:
- Errors from the Sapo API are caught and returned as node errors unless "Continue On Fail" is enabled.
- Typical error messages may include "Resource not found," "Invalid metafield ID," or authentication-related errors.
Resolutions:
- Verify that the product ID and metafield ID exist and are correct.
- Ensure the API credentials are valid and have sufficient permissions.
- Use the "Continue On Fail" option to handle errors gracefully in workflows.
Links and References
- Sapo API Documentation (general reference for Sapo API)
- n8n documentation on creating custom nodes