Sapo Blog icon

Sapo Blog

Manage Sapo blogs and articles

Overview

This node, named "Sapo Blog," is designed to manage blogs and articles within the Sapo platform. It supports operations on two main resources: blogs and articles. For blogs, it can create, retrieve, update, delete, and list multiple blogs. For articles (which belong to blogs), it can perform similar CRUD operations, as well as manage comments on articles, including creating, retrieving, updating, deleting comments, listing multiple comments, and checking for spam.

A common use case for this node would be automating content management workflows, such as publishing new blog posts or articles, moderating comments, or synchronizing blog data between systems. For example, a user could automate fetching all published articles from a specific blog or automatically create comments based on external feedback.

Properties

Name Meaning
ID Blog The numeric identifier of the blog to operate on.
Trả Về Tất Cả Boolean flag indicating whether to return all results or limit the number of returned items.
Giới Hạn Maximum number of results to return when not returning all.
Thông Tin Bổ Sung Additional optional filters and fields to refine the query, including:
- Published Status: Any, Published, Unpublished
- Handle: Filter by URL slug
- Created After: Filter by creation date minimum
- Created Before: Filter by creation date maximum
- Author: Filter by author name

Notes on properties:

  • The ID Blog property is required and identifies which blog the operation targets.
  • The Trả Về Tất Cả and Giới Hạn properties control pagination for list operations.
  • The Thông Tin Bổ Sung collection allows filtering lists by publication status, handle, creation dates, and author.

Output

The node outputs an array with one item containing a json field. This JSON object contains the response data from the Sapo API corresponding to the requested operation:

  • For getMany (list) operations, the output is a list of blogs or articles matching the criteria.
  • For get operations, the output is a single blog or article object.
  • For create, update, and delete operations, the output reflects the success status or the created/updated resource.
  • For comment-related operations, the output includes comment details or success confirmation.
  • If an error occurs and "Continue On Fail" is enabled, 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.
  • Uses the internal SapoApiBase class to interact with the Sapo blogging platform's REST API.
  • No additional external dependencies beyond the Sapo API and n8n environment.

Troubleshooting

  • Common issues:

    • Invalid or missing blog ID or article ID parameters may cause errors.
    • API authentication failures if the API key credential is misconfigured.
    • Exceeding rate limits imposed by the Sapo API.
    • Providing invalid filter values in additional fields may result in empty responses or errors.
  • Error messages:

    • Errors thrown by the node include the API error message and stack trace.
    • If "Continue On Fail" is disabled, the node execution stops on the first error.
    • To resolve errors, verify input parameters, ensure valid API credentials, and check network connectivity.

Links and References

Discussion