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.

Move

AI-generated

Overview

This node operation moves a content block within a SiYuan document to a new position. It allows repositioning a block either after a specified sibling block or as a child under a specified parent block. This is useful for reorganizing document structure dynamically, such as moving sections or paragraphs within notes or documents managed in SiYuan.

Use Case Examples

  1. Move a block to be the last child of a different parent block by specifying the new parent ID.
  2. Reorder blocks by moving a block to follow immediately after a specific sibling block.

Properties

Name Meaning
Block ID The unique identifier of the block to be moved.
Move After Block ID The ID of the sibling block after which the block should be placed. Optional; if not provided, the block is not moved relative to siblings.
Move Under Parent ID The ID of the parent block under which the block should be placed as a child. Optional; if not provided, the parent remains unchanged.

Output

JSON

  • success - Indicates whether the move operation was successful.

Dependencies

  • SiYuan API with API URL and API token credentials

Troubleshooting

  • Ensure the block ID provided exists; otherwise, the move operation will fail.
  • If both 'Move After Block ID' and 'Move Under Parent ID' are empty, the block may not move as expected.
  • API authentication errors may occur if credentials are missing or invalid; verify API URL and token.

Links

Discussion