Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node interacts with the Sapo blogging platform to manage blog articles. Specifically, for the "Bài Viết" (Article) resource and the "Lấy Danh Sách" (Get Many) operation, it retrieves a list of articles from a specified blog. This is useful when you want to fetch multiple articles for display, analysis, or further processing within an automation workflow.
Practical examples include:
- Automatically fetching recent articles from a blog to share on social media.
- Aggregating article data for reporting or content auditing.
- Filtering articles by publication status or date range to trigger specific workflows.
Properties
| Name | Meaning |
|---|---|
ID Blog (blogId) |
The numeric identifier of the blog from which to retrieve articles. |
Trả Về Tất Cả (returnAll) |
Boolean option to return all articles available or limit the number of results returned. |
Giới Hạn (limit) |
Maximum number of articles to return if not returning all. Minimum value is 1. |
Thông Tin Bổ Sung (additionalFields) |
Additional optional filters to refine the article list: - Published Status: Any, Published, Unpublished - Handle: Filter by URL slug - Created After: Filter articles created after this date/time - Created Before: Filter articles created before this date/time - Author: Filter by author name |
Output
The output is an array containing one item with a json property holding the retrieved articles data. The structure depends on the API response but typically includes article details such as title, author, body content, tags, publication status, creation date, and other metadata.
Example simplified JSON output structure:
{
"articles": [
{
"id": 123,
"title": "New Product Launch",
"author": "John Doe",
"body_html": "<p>Exciting announcement...</p>",
"tags": "news, products",
"published": true,
"created_at": "2024-01-01T12:00:00Z",
"handle": "new-product-launch"
},
...
],
"pagination": {
"limit": 50,
"total": 200,
"page": 1
}
}
No binary data output is involved in this operation.
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.
- Network access to the Sapo API endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing blog ID will cause the API call to fail.
- Incorrect API credentials or expired tokens will result in authentication errors.
- Requesting too many articles without pagination may lead to timeouts or rate limiting.
- Date filters must be valid ISO date strings; invalid formats may cause errors.
Error messages:
"Invalid blog ID": Verify that the blog ID exists and is correct."Authentication failed": Check that the API key credential is properly set up and has required permissions."Rate limit exceeded": Reduce the number of requests or enablereturnAllcautiously."Invalid filter parameter": Ensure additional fields like dates and handles are correctly formatted.
To resolve errors, verify input parameters, ensure valid credentials, and consult Sapo API documentation for limits and requirements.
Links and References
- Sapo API Documentation (general reference for API endpoints and parameters)
- n8n Documentation (for configuring credentials and using nodes)