Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node manages blogs and articles within the Sapo platform, providing operations to create, retrieve, update, delete, and manage comments on blogs and articles. Specifically, for the Blog resource with the Kiểm Tra Spam (Spam Check) operation, it checks whether a specific comment on an article is considered spam.
Common scenarios include:
- Moderating blog comments by automatically checking if a comment is spam.
- Managing blog content and comments programmatically.
- Automating workflows that require validation of user-generated content before publishing or further processing.
Practical example:
- A user submits a comment on a blog article; this node can be used to verify if the comment is spam before approving or displaying it publicly.
Properties
| Name | Meaning |
|---|---|
| ID Blog | The unique identifier of the blog where the article/comment resides. |
| ID Bình Luận | The unique identifier of the comment to check for spam (required for spamCheck operation). |
Note: The provided properties are filtered for the Blog resource and Kiểm Tra Spam operation context. The ID Bình Luận property is required when performing the spam check on a comment.
Output
The output JSON contains the result of the spam check operation. It typically includes information indicating whether the specified comment is identified as spam or not. The exact structure depends on the API response but will be accessible in the json field of the output item.
If the operation succeeds, the output might look like:
{
"is_spam": true,
"comment_id": 123,
"article_id": 456,
"blog_id": 789
}
(Example fields are illustrative; actual fields depend on the API.)
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the Sapo API via an API key credential configured in n8n.
- The node depends on the internal
SapoApiBaseclass to interact with the Sapo blogging platform's REST API. - Proper permissions on the Sapo account to access blog, article, and comment data.
Troubleshooting
Common issues:
- Invalid or missing blog, article, or comment IDs will cause errors.
- Insufficient API permissions or expired credentials may lead to authentication failures.
- Network connectivity problems can prevent API calls from succeeding.
Error messages:
- Errors returned from the API will be caught and presented as node errors unless "Continue On Fail" is enabled.
- Typical error messages include "Comment not found," "Invalid blog ID," or "Unauthorized."
Resolutions:
- Verify that all required IDs are correct and exist in the Sapo system.
- Ensure the API key credential is valid and has necessary permissions.
- Check network connectivity and retry if transient errors occur.
Links and References
- Sapo API Documentation (general reference for Sapo platform APIs)
- n8n documentation on creating custom nodes