Sapo Blog icon

Sapo Blog

Manage Sapo blogs and articles

Overview

This node integrates with the Sapo blogging platform to manage blogs, articles, and comments. It allows users to perform various operations such as creating, updating, retrieving, and deleting blogs, articles, and comments. Specifically, for the "Cập Nhật Bình Luận" (Update Comment) operation under the Default resource, it updates an existing comment on a blog article.

Common scenarios where this node is beneficial include:

  • Automating content management workflows by programmatically updating blog comments.
  • Moderating user comments by editing or correcting them without manual intervention.
  • Integrating blog comment updates into larger automation pipelines, e.g., syncing comment changes with CRM or support systems.

Practical example:

  • A marketing team uses this node to update user comments on product announcement articles to correct typos or add moderator notes automatically.

Properties

Name Meaning
ID Blog The unique numeric identifier of the blog containing the article.
ID Bình Luận The unique numeric identifier of the comment to be updated.
Dữ Liệu Bình Luận JSON object containing the comment data to update, including fields like author, email, body text, and IP address.

The Dữ Liệu Bình Luận property expects a JSON structure similar to:

{
  "author": "John Doe",
  "email": "john@example.com",
  "body": "Great article!",
  "ip": "127.0.0.1"
}

Output

The node outputs a JSON object representing the updated comment data returned from the Sapo API after the update operation. This typically includes all comment details reflecting the new state post-update.

If the operation succeeds, the output JSON contains the updated comment's full information. If an error occurs and the node is set to continue on failure, the output will contain an error field with the error message.

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.
  • The node depends on the SapoApiBase class for making authenticated API requests to manage blogs, articles, and comments.
  • Proper permissions on the Sapo account are necessary to update comments.

Troubleshooting

  • Common issues:

    • Invalid or missing blog ID or comment ID can cause failures.
    • Incorrectly formatted JSON in the comment data may lead to API errors.
    • Insufficient API permissions or expired credentials will prevent successful updates.
  • Error messages:

    • Errors from the Sapo API will be surfaced with their message. For example, "Comment not found" indicates the specified comment ID does not exist.
    • Authentication errors suggest checking the API key credential configuration.
    • JSON parsing errors indicate malformed input in the comment data field.

To resolve these:

  • Verify that the blog ID and comment ID are correct and correspond to existing entities.
  • Ensure the JSON data for the comment is valid and includes required fields.
  • Confirm that the API key credential is correctly set up and has necessary permissions.

Links and References

Discussion