Sapo Blog icon

Sapo Blog

Manage Sapo blogs and articles

Overview

This node integrates with the Sapo blogging platform to manage blogs, articles, and comments. Specifically for the "Bài Viết" (Article) resource and the "Tạo Bình Luận" (Create Comment) operation, it allows users to add new comments to a specific article within a blog.

Common scenarios include:

  • Automatically adding user feedback or reviews as comments on blog articles.
  • Moderating and managing community interactions by programmatically creating comments.
  • Integrating external systems that collect comments and push them into the Sapo blog articles.

Example: After publishing a new product announcement article, you can use this node to add initial comments or testimonials automatically.

Properties

Name Meaning
ID Blog The unique numeric identifier of the blog where the article resides.
ID Bài Viết The unique numeric identifier of the article to which the comment will be added.
Dữ Liệu Bình Luận JSON object containing the comment data including author name, email, comment body, and IP address. Example structure:
{
  "author": "John Doe",
  "email": "john@example.com",
  "body": "Great article!",
  "ip": "127.0.0.1"
}
``` |

## Output
The output is a JSON object representing the newly created comment as returned by the Sapo API. This typically includes details such as the comment's ID, author, content, creation timestamp, and status.

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 `SapoApiBase` class to interact with the Sapo blogging platform.
- Proper permissions to create comments on the specified blog and article are necessary.

## Troubleshooting
- **Common issues:**
  - Invalid or missing blog or article IDs will cause failures.
  - Malformed JSON in the comment data property may result in errors.
  - Insufficient API permissions or expired credentials can block comment creation.

- **Error messages:**
  - Errors from the API will be surfaced with their message; for example, "Blog not found" or "Article does not exist".
  - Network or authentication errors will also be reported.

- **Resolutions:**
  - Verify that the blog and article IDs are correct and exist.
  - Ensure the JSON comment data is well-formed and contains all required fields.
  - Check and refresh API credentials if authentication fails.

## Links and References
- [Sapo Blog API Documentation](https://developers.sapo.vn/docs/blog-api) (example link, replace with actual)
- n8n documentation on [Creating Custom Nodes](https://docs.n8n.io/integrations/creating-nodes/)

Discussion