Actions33
- Bài Viết Actions
- Blog Actions
Overview
This node manages blogs and articles within the Sapo platform, allowing users to perform various operations such as creating, updating, retrieving, and deleting blogs and articles. Specifically for the "Bài Viết" (Article) resource with the "Cập Nhật" (Update) operation, it updates an existing article in a specified blog by providing the blog ID, article ID, and new article data.
Common scenarios include:
- Updating the content or metadata of an existing blog article, such as changing the title, author, body content, tags, or publication status.
- Keeping blog articles current with new information or corrections.
- Automating blog content management workflows where articles need frequent updates.
Example use case:
- A marketing team uses this node to update product launch articles on their company blog automatically when new details become available.
Properties
| Name | Meaning |
|---|---|
| ID Blog | The unique numeric identifier of the blog containing the article to update. |
| ID Bài Viết | The unique numeric identifier of the article to update within the specified blog. |
| Dữ Liệu Bài Viết | JSON object containing the updated article data. Typical fields include: title, author, body_html (HTML content), tags (comma-separated string), and published (boolean indicating if the article is published). |
Output
The node outputs a JSON object representing the updated article as returned by the Sapo API. This typically includes all article properties after the update, such as the updated title, author, content, tags, publication status, and any other metadata managed by the API.
If the update is successful, the output JSON contains the full updated article data. If an error occurs and the node is set to continue on failure, the output will contain an error field with the error message.
The node does not output binary data.
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 handle API requests related to blogs and articles. - Proper permissions on the Sapo account to update articles are necessary.
Troubleshooting
Common issues:
- Invalid or missing blog ID or article ID will cause the update to fail.
- Malformed JSON in the article data property can lead to errors.
- Insufficient API permissions or expired credentials may result in authentication errors.
- Network connectivity problems can cause request failures.
Error messages:
- Errors from the Sapo API will be surfaced with their message. For example, "Article not found" indicates the specified article ID does not exist in the given blog.
- "Unauthorized" or similar messages indicate issues with API credentials.
- To resolve, verify IDs, ensure JSON data correctness, check API credentials, and confirm network access.
Links and References
- Sapo API Documentation (general reference for API endpoints and data structures)
- n8n documentation on creating custom nodes