Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node integrates with the Sapo Blog platform to manage blogs, articles, and comments programmatically. Specifically, for the "Bài Viết" (Article) resource and the "Cập Nhật Bình Luận" (Update Comment) operation, it updates an existing comment on a specified article within a blog.
Common scenarios where this node is useful include:
- Moderating or editing user comments on blog articles automatically.
- Correcting or updating comment content based on external triggers or workflows.
- Integrating comment management into broader automation pipelines, such as CRM or customer support systems.
For example, you could use this node to update a comment's author name or body text after receiving updated information from another system.
Properties
| Name | Meaning |
|---|---|
| ID Blog | The unique numeric identifier of the blog containing the article. |
| ID Bài Viết | The unique numeric identifier of the article within the blog where the comment exists. |
| ID Bình Luận | The unique numeric identifier of the comment to be updated. |
| Dữ Liệu Bình Luận | JSON object containing the comment data to update. Typical fields include: author, email, body (comment text), and IP address. |
Example of Dữ Liệu Bình Luận JSON structure:
{
"author": "John Doe",
"email": "john@example.com",
"body": "Great article!",
"ip": "127.0.0.1"
}
Output
The node outputs an array with one element containing a json field. This field holds the response from the Sapo API after updating the comment. Typically, this will be the updated comment object reflecting the new data.
If the update fails and the node is configured to continue on failure, the output will contain an error message in the json.error field.
No binary data output is involved in this operation.
Dependencies
- Requires a valid connection to the Sapo Blog API via an API key credential configured in n8n.
- The node depends on the internal
SapoApiBaseclass to handle API requests. - Proper permissions on the Sapo Blog account to update comments are necessary.
Troubleshooting
Common issues:
- Invalid or missing blog, article, or comment IDs will cause errors.
- Incorrectly formatted JSON in the comment data may lead to API rejection.
- Insufficient permissions or invalid API credentials will result in authentication errors.
Error messages:
- Errors returned by the Sapo API will be surfaced as node errors unless "Continue On Fail" is enabled.
- Typical error messages might include "Comment not found," "Invalid data format," or "Unauthorized."
Resolutions:
- Verify all IDs correspond to existing resources.
- Ensure the JSON data matches expected schema and required fields.
- Confirm API credentials are correct and have sufficient access rights.
Links and References
- Sapo Blog API Documentation (general reference; actual URL may vary)
- n8n documentation on creating custom nodes