SiYuan Block Tool icon

SiYuan Block Tool

Use this tool to create, read, update, move, and delete content blocks within SiYuan documents. Use "append" to add content to a document, "getContentMd" to read a block, or "update" to modify existing content.

Update

AI-generated

Overview

This node operation updates the content of an existing block within a SiYuan document using Markdown format. It is useful for scenarios where you need to modify or replace the content of a specific block identified by its unique Block ID. For example, you can update a note or section in a document programmatically to keep content current or correct errors.

Use Case Examples

  1. Updating a block's Markdown content to reflect new information or corrections.
  2. Replacing outdated content in a document block with updated text.

Properties

Name Meaning
Block ID The unique identifier of the block to be updated.
Content (Markdown) The new Markdown content to replace the existing content of the block.

Output

JSON

  • success - Indicates whether the update operation was successful.

Dependencies

  • Requires an API key credential for SiYuan API authentication.

Troubleshooting

  • Common issues include providing an invalid or non-existent Block ID, which will cause the update to fail.
  • Errors may occur if the API token or URL credentials are incorrect or missing.
  • Ensure the Markdown content is properly formatted to avoid content rendering issues.

Links

Discussion