Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node integrates with the Sapo platform to manage blogs and articles programmatically. It supports 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, such as publishing new blog posts, updating existing ones, or moderating article comments without manual intervention.
For example, you can use this node to:
- Automatically create a new blog with specified metadata.
- Retrieve details of a specific blog by its ID.
- Create a new article within a blog.
- Manage comments on articles, including creating, updating, deleting, and spam checking.
Properties
| Name | Meaning |
|---|---|
| ID Blog | The numeric identifier of the blog where the operation applies. |
Note: The provided input properties JSON only includes "ID Blog" (blogId) because the user requested information for Resource: Default and Operation: Tạo Mới (Create). The node also supports many other properties depending on resource and operation, but they are not included here per instructions.
Output
The node outputs an array with one item containing a json object representing the result of the performed operation. The structure of this JSON depends on the operation:
- For create operations on blogs or articles, it returns the created entity's data as received from the Sapo API.
- For get operations, it returns the retrieved blog or article details.
- For update operations, it returns the updated entity's data.
- For delete operations, it returns a simple success confirmation object
{ success: true }. - For comment-related operations, it returns the comment data or success confirmation similarly.
No binary data output is produced by this node.
Dependencies
- Requires an active connection to the Sapo API via an API key credential configured in n8n.
- Uses the internal
SapoApiBaseclass to interact with the Sapo API endpoints for blogs, articles, and comments. - No additional external dependencies beyond the Sapo API and n8n environment.
Troubleshooting
Common issues:
- Invalid or missing blog ID (
blogId) will cause API errors. - Incorrectly formatted JSON data for creation or update operations may lead to request failures.
- Network or authentication errors if the API key credential is invalid or expired.
- Invalid or missing blog ID (
Error messages:
- Errors returned from the Sapo API are caught and presented as node errors with message and stack trace.
- If "Continue On Fail" is enabled, errors are returned as part of the output JSON under an
errorfield instead of stopping execution.
Resolutions:
- Verify that the blog ID exists and is correct.
- Ensure JSON input data matches expected schema for the resource.
- Confirm API credentials are valid and have necessary permissions.
- Use "Continue On Fail" cautiously to handle partial failures gracefully.
Links and References
- Sapo API Documentation (official API docs for blogs and articles)
- n8n documentation on creating custom nodes