Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node integrates with the Sapo platform to manage blogs and articles programmatically. It allows users to perform various operations such as creating, retrieving, updating, and deleting blogs and articles, as well as managing comments on articles. This node is useful for automating content management workflows, synchronizing blog data between systems, or moderating article comments.
Practical examples include:
- Automatically publishing new blog posts from an external CMS.
- Fetching a list of recent articles for display in another application.
- Moderating comments by retrieving, updating, or deleting them.
- Checking if a comment is marked as spam before approval.
Properties
| Name | Meaning |
|---|---|
| ID Blog | The unique numeric identifier of the blog to operate on. |
Note: Since the user requested only the "Default" Resource and Operation, and provided one property "blogId", this table reflects that input property.
Output
The node outputs a JSON object representing the result of the selected operation. The structure varies depending on the operation:
- For retrieval operations (
get,getMany, etc.), it returns the corresponding blog, article, comment, or list data as JSON. - For creation or update operations, it returns the newly created or updated resource details.
- For deletion operations, it returns a simple success confirmation object
{ success: true }. - In case of errors (if not continuing on fail), the node throws an error with message and stack trace; if continuing on fail, it outputs an error object in JSON.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the Sapo API.
- Depends on the
SapoApiBaseclass which handles communication with the Sapo backend. - Needs proper configuration of the API credentials within n8n to function correctly.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing incorrect blog or article IDs may result in "not found" errors.
- Exceeding API rate limits could lead to temporary request rejections.
- Improperly formatted JSON data in the
dataproperty can cause validation errors.
Error messages:
- Errors thrown by the node include the message and stack trace from the underlying API call.
- If the node is set to continue on failure, errors are returned as JSON objects with an
errorfield containing the message.
Resolutions:
- Verify API credentials and permissions.
- Double-check IDs and required parameters.
- Ensure JSON input data is valid and matches expected schema.
- Handle rate limiting by adding delays or retries in workflows.
Links and References
- Sapo Official API Documentation (general reference for Sapo API)
- n8n documentation on creating custom nodes