SiYuan icon

SiYuan

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

Block → Move

AI-generated

Overview

This node operation moves a content block within a SiYuan document. 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 to new locations within a document hierarchy.

Use Case Examples

  1. Moving a block to appear after another block to reorder content.
  2. Moving a block under a different parent block to change its nesting level in the document.

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. If empty, the block will be moved under the specified parent ID instead.
Move Under Parent ID The ID of the parent block under which the block should be placed as a child. Used only if 'Move After Block ID' is empty.

Output

JSON

  • success - Indicates whether the move operation was successful.

Dependencies

  • SiYuan API URL and Token for authentication

Troubleshooting

  • Ensure the Block ID is valid and exists in the document.
  • If both 'Move After Block ID' and 'Move Under Parent ID' are empty, the move operation will not know where to place the block.
  • API authentication errors if the SiYuan API URL or token are missing or incorrect.
  • Handle errors gracefully if the block cannot be moved due to permission or structural constraints.

Discussion