SiYuan icon

SiYuan

Manage SiYuan notebooks, documents, blocks, attributes, and more. Designed for AI agent workflows.

Block → Update

AI-generated

Overview

This node operation updates the content of a specific block within a SiYuan document. It is useful for workflows that need to programmatically modify the content of blocks, such as updating notes, changing document sections, or automating content edits in a SiYuan workspace. For example, it can be used to update a block's Markdown content based on external data or user input.

Use Case Examples

  1. Updating a block's Markdown content to reflect new information.
  2. Changing the format of a block's content from Markdown to HTML.
  3. Automating content updates in a document based on external triggers.

Properties

Name Meaning
Block ID The unique identifier of the block to update.
Content (Markdown) The new Markdown content to set for the block.
Additional Options Optional settings for the update operation, including the data format of the content (Markdown or DOM/HTML).

Output

JSON

  • success - Indicates whether the update operation was successful.

Dependencies

  • Requires SiYuan API URL and API token credentials for authentication.

Troubleshooting

  • Ensure the Block ID is correct and exists in the SiYuan workspace to avoid errors.
  • Verify that the API URL and token credentials are correctly configured and valid.
  • If the content format is set incorrectly, the update may fail or produce unexpected results; ensure the dataType option matches the content format.
  • Common error messages include missing credentials, unsupported resource or operation, and API communication errors. These can be resolved by checking credentials, resource/operation names, and network connectivity.

Discussion