Sapo Blog icon

Sapo Blog

Manage Sapo blogs and articles

Overview

This node, named "Sapo Blog," allows users to manage blogs and articles on the Sapo platform. It supports operations such as creating, retrieving, updating, and deleting blogs, articles, and comments. Additionally, it can list multiple blogs or articles with filtering options and perform spam checks on comments.

A common use case is automating blog content management workflows, such as publishing new articles, moderating comments, or fetching blog data for display in other systems. For example, a marketing team could use this node to automatically publish new product announcements as blog posts and monitor user comments for spam.

The specific operation "Lấy Bình Luận" (Get Comment) retrieves a single comment by its ID from a specified blog article.

Properties

Name Meaning
ID Blog The numeric identifier of the blog containing the article.
ID Bình Luận The numeric identifier of the comment to retrieve. Required for operations involving comments like getComment, updateComment, deleteComment, and spamCheck.

Output

The node outputs an array with one element containing a json object representing the result of the requested operation.

For the "Lấy Bình Luận" operation, the output JSON contains the details of the specified comment, including fields such as author, email, body text, IP address, and any metadata returned by the Sapo API.

If the operation involves deletion, the output JSON will contain a success confirmation, e.g., { success: true }.

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 SapoApiBase class to interact with the Sapo blogging platform's REST API.
  • No additional external dependencies are required beyond the configured API credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing blog ID or comment ID parameters will cause errors.
    • Network or authentication failures with the Sapo API may result in request errors.
    • Attempting to retrieve a comment that does not exist will likely return an error or empty response.
  • Error messages:

    • Errors thrown include descriptive messages from the API or network layer.
    • If "Continue On Fail" is enabled, errors are returned in the output JSON under an error field instead of stopping execution.
  • Resolution tips:

    • Verify that the blog ID and comment ID are correct and correspond to existing resources.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Check network connectivity and API endpoint availability.

Links and References

Discussion