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
Blog → Xác Thực
AI-generatedOverview
This node manages custom metafields on various Sapo resources such as blogs, articles, products, and more. It allows users to create, retrieve, update, delete, count, bulk delete, and validate metafields associated with a specific resource by its ID.
A common use case is enriching Sapo entities (e.g., blog posts) with additional metadata that is not part of the standard fields, enabling more flexible data management or integration scenarios. For example, you might add a custom "author_bio" metafield to blog posts or validate a metafield value before saving it.
The "Xác Thực" (Validate) operation specifically checks if a given metafield value meets certain criteria without modifying any data, useful for pre-validation in workflows.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The numeric ID of the resource (e.g., a blog post) to which the metafield belongs. |
| Tùy Chọn Xác Thực | JSON object specifying the validation data for the metafield. It includes: |
- type: The type of the value (e.g., string). |
|
- value: The actual value to validate (e.g., "test value"). |
Output
The node outputs a JSON object representing the result of the operation:
For the validate operation, the output JSON contains:
{ "valid": true }indicating the metafield value passed validation.
In case of errors during execution, the output JSON will contain an
errorfield with the error message if the node is set to continue on failure.
No binary data is produced by this node.
Dependencies
- Requires an API credential for authenticating with the Sapo platform.
- Depends on the internal
SapoApiBaseclass to interact with Sapo's metafield API endpoints. - No additional external services are required beyond the configured Sapo API access.
Troubleshooting
Common issues:
- Invalid or missing resource ID can cause failures when targeting a specific resource.
- Malformed JSON in the validationData property may lead to parsing errors.
- Validation failures if the provided value does not meet expected criteria.
Error messages:
- Errors from the Sapo API (e.g., resource not found, invalid metafield ID) will be surfaced with their messages.
- If the node throws an error about credentials, ensure the API key/token is correctly configured.
- To handle errors gracefully, enable "Continue On Fail" in the node settings to capture errors in the output JSON.
Links and References
- Sapo Metafields API Documentation (example placeholder, replace with actual URL if available)
- n8n documentation on Creating Custom Nodes