Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node integrates with the Sapo Blog platform to manage blogs, articles, and their comments. Specifically for the "Bài Viết" (Article) resource and the "Lấy Danh Sách Bình Luận" (Get Comments List) operation, it retrieves a list of comments associated with a specific article within a blog.
Common scenarios where this node is useful include:
- Fetching all user comments on a particular article for moderation or analysis.
- Integrating comment data into other workflows, such as sentiment analysis or customer feedback processing.
- Displaying recent comments dynamically in external applications or dashboards.
For example, you might use this node to pull all comments from an article about a new product launch to analyze customer reactions or to feed them into a CRM 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 whose comments are being retrieved. |
| Trả Về Tất Cả | Boolean flag indicating whether to return all comments or limit the number of results returned. |
| Giới Hạn | Maximum number of comments to return if not returning all. Minimum value is 1. |
| Thông Tin Bổ Sung | Additional optional filters to refine the comments list: |
| - Published Status: Filter comments by any, published, or unpublished status. | |
| - Handle: Filter by URL slug. | |
| - Created After: Only include comments created after this date/time. | |
| - Created Before: Only include comments created before this date/time. | |
| - Author: Filter comments by author name. |
Output
The output is an array with one element containing a json field. This json field holds the response from the Sapo API representing the list of comments for the specified article. The structure typically includes comment details such as author, email, body text, creation date, and status.
If the operation succeeds, the output JSON will contain the comments data as returned by the API. If the operation fails and "Continue On Fail" is enabled, the output will contain an error object with the error message.
No binary data is output by this operation.
Dependencies
- Requires a valid connection to the Sapo API via an API key credential configured in n8n.
- Uses the internal
SapoApiBaseclass to interact with the Sapo Blog API endpoints. - No additional external dependencies beyond the Sapo API service.
Troubleshooting
Common Issues:
- Invalid or missing blog or article IDs will cause the API call to fail.
- Insufficient permissions or invalid API credentials can result in authentication errors.
- Requesting too many comments without enabling "Return All" may lead to truncated results.
Error Messages:
- Errors from the Sapo API are caught and either thrown or returned in the output depending on the "Continue On Fail" setting.
- Typical error messages include invalid ID references, permission denied, or network issues.
Resolutions:
- Verify that the blog and article IDs are correct and exist in your Sapo account.
- Ensure the API key credential is properly set up and has necessary permissions.
- Use the "Return All" option carefully to avoid performance issues with very large comment lists.
Links and References
- Sapo Blog API Documentation (general reference for API endpoints)
- n8n Documentation on Creating Custom Nodes