SiYuan icon

SiYuan

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

Block → Get Child Blocks

AI-generated

Overview

This node operation retrieves the child blocks of a specified block within a SiYuan document. It is useful for workflows that need to access or manipulate the hierarchical content structure of documents, such as extracting nested content, analyzing document structure, or automating content updates based on block relationships.

Use Case Examples

  1. Extract all child blocks of a given block to analyze document structure.
  2. Retrieve nested content blocks to automate content processing or transformation.

Properties

Name Meaning
Block ID The unique ID of the block whose child blocks are to be retrieved.

Output

JSON

  • id - The unique identifier of each child block.
  • type - The type of each child block (e.g., paragraph, heading).
  • content - The content or text within each child block.
  • children - Nested child blocks within each block, if any.

Dependencies

  • SiYuan API URL and Token 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 properly set and valid.
  • Common error: 'Unsupported resource' indicates the resource parameter is incorrect or not handled by the node.
  • If the node throws an error about missing credentials, check that the SiYuan API credentials are configured in n8n.

Discussion