SiYuan icon

SiYuan

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

Block → Insert

AI-generated

Summary

Inserts Markdown or HTML content as a new block in SiYuan, positioned relative to an existing block or within the specified parent. Set Previous Block ID to place it after that block, or leave it empty and set Next Block ID to place it before that block.

Inputs

  • Parent Block ID (required) — ID of the document or container block to insert into.
  • Content (Markdown) (required) — Content for the new block. The Data Type option determines whether it is interpreted as Markdown (default) or DOM (HTML).
  • Previous Block ID — Optional sibling block ID to insert after. When set, it takes precedence over Next Block ID.
  • Next Block ID — Optional sibling block ID to insert before; used when Previous Block ID is empty.
  • Data Type — Choose Markdown (default) or DOM (HTML) for the content.

Output shape

The SiYuan API response data for the insert operation, passed through as n8n JSON output.

The operation sends the content and data type to SiYuan's insert-block API, along with any non-empty previous, next, and parent IDs. The source does not specify the response fields.

Links

Discussion