Sapo Blog icon

Sapo Blog

Manage Sapo blogs and articles

Overview

This node integrates with the Sapo blogging platform to manage blogs and articles programmatically. It supports operations such as creating, retrieving, updating, and deleting both blogs and articles, as well as managing comments on articles. The node is useful for automating content management workflows, synchronizing blog data, or integrating Sapo blog content into other systems.

For the specific Resource "Bài Viết" (Article) and Operation "Lấy Chi Tiết" (Get Detail), the node fetches detailed information about a particular article within a specified blog. This is beneficial when you need to retrieve full article data for display, processing, or further automation.

Example use case:

  • Automatically fetching an article's details by its ID to display on a website or send in a notification email.
  • Integrating article data into a CMS or analytics system.

Properties

Name Meaning
ID Blog The numeric identifier of the blog that contains the article.
ID Bài Viết The numeric identifier of the article to retrieve details for.

Output

The output is a JSON object representing the detailed data of the requested article. This includes all fields returned by the Sapo API for an article, such as title, author, body content (HTML), tags, publication status, and any other metadata associated with the article.

The output structure is:

{
  // Example fields - actual fields depend on Sapo API response
  "id": 123,
  "title": "New Product Launch",
  "author": "John Doe",
  "body_html": "<p>Exciting announcement...</p>",
  "tags": "news, products",
  "published": true,
  ...
}

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Sapo API via an API key credential configured in n8n.
  • The node depends on the SapoApiBase class which handles API requests to Sapo's blogging endpoints.
  • Proper network access to Sapo's API endpoints is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing blog ID or article ID parameters will cause errors.
    • Network connectivity problems or invalid API credentials will prevent successful API calls.
    • If the article does not exist or has been deleted, the API may return a not found error.
  • Error messages:

    • Errors from the Sapo API are caught and reported. For example, "Not Found" if the article ID is invalid.
    • If the node is set to continue on fail, errors will be returned in the output JSON under an error field.
    • To resolve errors, verify that the blog and article IDs are correct and that the API credentials have sufficient permissions.

Links and References

Discussion