Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node manages blogs and articles within the Sapo platform, focusing on operations such as creating, retrieving, updating, deleting blogs and articles, as well as managing comments and spam checks on articles. Specifically, for the Blog resource with the Lấy Danh Sách (Get Many) operation, it retrieves a list of blogs based on specified filters and limits.
Common scenarios where this node is beneficial include:
- Fetching multiple blog entries to display on a website or app.
- Filtering blogs by publication status, creation date, author, or URL slug.
- Integrating blog data into other workflows for content management or analytics.
Practical example:
- A marketing team wants to pull all published blogs created after a certain date to generate a newsletter.
- A developer needs to retrieve a limited number of blogs filtered by a specific handle (URL slug) for display in a custom frontend.
Properties
| Name | Meaning |
|---|---|
| ID Blog | The unique numeric identifier of the blog to operate on. |
| Trả Về Tất Cả | Whether to return all matching blog results or only up to a specified limit. |
| Giới Hạn | Maximum number of blog results to return when not returning all. |
| Thông Tin Bổ Sung | Additional optional filters to refine the blog list: |
| - Published Status | Filter blogs by their publication status: Any, Published, or Unpublished. |
| - Handle | Filter blogs by their handle (URL slug). |
| - Created After | Filter blogs created after this date/time. |
| - Created Before | Filter blogs created before this date/time. |
| - Author | Filter blogs by author name. |
Output
The output is an array containing one object per execution, each with a json field holding the response data from the Sapo API:
- For the Lấy Danh Sách operation on blogs, the
jsonfield contains a list of blog objects matching the filter criteria. - Each blog object typically includes properties like blog ID, title, handle, publication status, creation date, author, and other metadata as returned by the API.
- There is no binary data output for this operation.
Example output structure (simplified):
[
{
"json": {
"blogs": [
{
"id": 123,
"title": "Company News",
"handle": "news",
"published_status": "published",
"created_at": "2023-01-01T12:00:00Z",
"author": "John Doe"
},
...
],
"count": 10
}
}
]
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 endpoints. - No additional external services are required beyond the Sapo API.
Troubleshooting
Common issues:
- Invalid or missing blog ID parameter will cause the API call to fail.
- Incorrect API credentials or network issues may result in authentication or connectivity errors.
- Using incompatible filter values (e.g., invalid dates or unknown handles) might return empty results or errors.
Error messages:
- Errors from the Sapo API are caught and reported with their message. If
continueOnFailis enabled, errors appear in the output JSON under anerrorproperty. - Typical error:
"Invalid blog ID"— verify that the blog ID exists and is correct. - Authentication errors indicate misconfigured or expired API credentials; reconfigure the API key in n8n settings.
- Errors from the Sapo API are caught and reported with their message. If
To resolve errors, ensure all required parameters are correctly set, API credentials are valid, and network connectivity to the Sapo API is stable.
Links and References
- Sapo API Documentation (general reference for Sapo platform APIs)
- n8n documentation on creating and using API credentials
- n8n community forums for troubleshooting and examples related to Sapo integrations