Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node interacts with the Sapo blogging platform to manage blogs and their related content. Specifically, for the Blog resource and the Lấy Danh Sách Bình Luận (Get List of Comments) operation, it retrieves a list of comments associated with a specified blog.
Use cases include:
- Fetching all or a limited number of comments on a particular blog post.
- Filtering comments by various criteria such as publication status, creation date range, author, or URL slug.
- Integrating blog comment data into workflows for moderation, analytics, or display purposes.
For example, you might use this node to automatically gather recent comments on a blog post to analyze user feedback or to trigger notifications when new comments appear.
Properties
| Name | Meaning |
|---|---|
ID Blog (blogId) |
The unique numeric identifier of the blog from which to retrieve comments. |
Trả Về Tất Cả (returnAll) |
Boolean flag indicating whether to return all available comments (true) or limit the results (false). |
Giới Hạn (limit) |
Maximum number of comments to return if returnAll is set to false. Must be at least 1. |
Thông Tin Bổ Sung (additionalFields) |
Additional optional filters to refine the comment list: - Published Status: Any, Published, Unpublished - Handle: Filter by URL slug - Created After: Date/time filter for comments created after this timestamp - Created Before: Date/time filter for comments created before this timestamp - Author: Filter comments by author name |
Output
The output is an array containing one item with a json property holding the retrieved comments data. The structure of the json field depends on the API response but generally includes:
- Comment details such as author, email, body/content, creation date, and status.
- Metadata about the comments list, possibly including pagination info if not all comments are returned.
No binary data is output by this operation.
Example output snippet (simplified):
{
"comments": [
{
"id": 123,
"author": "Jane Doe",
"email": "jane@example.com",
"body": "Great post!",
"created_at": "2024-01-01T12:00:00Z",
"published_status": "published"
},
...
]
}
Dependencies
- Requires connection to the Sapo API via an API key credential configured in n8n.
- The node uses the Sapo API client internally to perform authenticated requests.
- No additional external dependencies beyond the configured API credentials.
Troubleshooting
Common issues:
- Invalid or missing blog ID will cause the API call to fail.
- Insufficient permissions or invalid API credentials may result in authentication errors.
- Requesting too many comments without setting
returnAllproperly can lead to truncated results. - Date filters must be valid ISO date strings; otherwise, the API may reject the request.
Error messages:
"Invalid blog ID": Verify that the blog ID exists and is correct."Authentication failed": Check that the API key credential is correctly set up and has necessary permissions."Limit must be a positive integer": Ensure thelimitproperty is set to a value of 1 or higher.- Network or timeout errors: Confirm network connectivity and API availability.
To resolve errors, verify input parameters, ensure proper API credentials, and consult the Sapo API documentation for any restrictions.
Links and References
- Sapo API Documentation (general reference for API endpoints and parameters)
- n8n Documentation on Creating Custom Nodes
- Best practices for handling paginated API responses in n8n workflows