Actions33
- Bài Viết Actions
- Blog Actions
Overview
The node manages Sapo blogs and articles, allowing users to perform various operations such as creating, retrieving, updating, deleting blogs and articles, managing comments, and specifically checking if a comment is spam. The "Kiểm Tra Spam" (Spam Check) operation under the "Bài Viết" (Article) resource checks whether a specific comment on an article is considered spam.
This node is beneficial in scenarios where blog content and user interactions need to be programmatically managed, for example:
- Automatically moderating comments by detecting spam.
- Managing blog posts and their metadata.
- Handling user comments including creation, updates, and deletions.
A practical example: A user can automate spam detection on new comments posted on articles to maintain content quality without manual review.
Properties
| Name | Meaning |
|---|---|
| ID Blog | The unique identifier of the blog containing the article. |
| ID Bài Viết | The unique identifier of the article within the blog. Required for article-related operations including spam check. |
| ID Bình Luận | The unique identifier of the comment to be checked for spam. Required for spam check operation. |
Output
The output is a JSON object representing the result of the requested operation. For the "Kiểm Tra Spam" operation, the JSON contains the response from the spam check API call indicating whether the specified comment is spam or not.
If the operation involves deletion, the output will be a JSON object with a success boolean field indicating the success of the deletion.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Sapo API service.
- Depends on the external Sapo API service to manage blogs, articles, comments, and perform spam checks.
- The node uses an internal helper class to interact with the Sapo API endpoints.
Troubleshooting
Common issues:
- Invalid or missing blog, article, or comment IDs will cause API errors.
- Network or authentication failures when connecting to the Sapo API.
- Attempting to perform operations not supported for the selected resource or operation combination.
Error messages:
- Errors returned from the Sapo API are surfaced with their message and stack trace.
- If the node is set to continue on failure, errors are returned in the output JSON under an
errorfield.
Resolutions:
- Verify that all required IDs are correctly provided and correspond to existing entities.
- Ensure the API key credential is valid and has necessary permissions.
- Check network connectivity and API endpoint availability.
Links and References
- Sapo API Documentation (general reference for the API used)
- n8n documentation on creating custom nodes