Sapo Blog icon

Sapo Blog

Manage Sapo blogs and articles

Overview

This node manages blog-related data on the Sapo platform, specifically focusing on blogs, articles, and their comments. For the Blog resource with the Update Comment operation, it updates an existing comment on a blog article by specifying the blog ID, comment ID, and new comment data.

Common scenarios include:

  • Editing user feedback or correcting information in a blog comment.
  • Moderating comments to update content without deleting them.
  • Automating comment updates based on external triggers or workflows.

Example: You have a blog post where a user left a comment with a typo. Using this node, you can programmatically update that comment’s text or author details.

Properties

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

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

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

Output

The output is a JSON object representing the updated comment as returned from the Sapo API. It contains all relevant fields of the comment after the update, such as author, email, body, IP, timestamps, and any other metadata provided by the API.

If the update is successful, the output will reflect the new state of the comment. If there is an error, the output may contain an error message describing what went wrong.

Dependencies

  • Requires an active connection to the Sapo API via an API key credential configured in n8n.
  • The node depends on the internal SapoApiBase class for making authenticated API requests to manage blogs, articles, and comments.

Troubleshooting

  • Common issues:
    • Invalid or missing blog ID or comment ID will cause the API call to fail.
    • Malformed JSON in the comment data property can lead to errors.
    • Insufficient permissions or invalid API credentials will result in authentication errors.
  • Error messages:
    • Errors from the API are caught and returned as node errors unless "Continue On Fail" is enabled.
    • Typical errors include "Comment not found," "Invalid blog ID," or "Unauthorized."
  • Resolutions:
    • Verify that the blog and comment IDs exist and are correct.
    • Ensure the JSON data is properly formatted.
    • Confirm that the API key credential has the necessary permissions.

Links and References

Discussion