Append Block
append_blockAppend a block to an AFFiNE document with support for multiple types (paragraph, heading, image, embed, etc.) and optional placement control.
Instructions
Append document blocks with canonical types and legacy aliases (supports placement + strict validation).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | No | ||
| docId | Yes | ||
| type | Yes | Block type. Canonical: paragraph|heading|quote|list|code|divider|callout|latex|table|bookmark|image|attachment|embed_youtube|embed_github|embed_figma|embed_loom|embed_html|embed_linked_doc|embed_synced_doc|embed_iframe|database|data_view|surface_ref|frame|edgeless_text|note. Legacy aliases remain supported. | |
| text | No | Block content text | |
| url | No | URL for bookmark/embeds | |
| pageId | No | Target page/doc id for linked/synced doc embeds | |
| iframeUrl | No | Override iframe src for embed_iframe | |
| html | No | Raw html for embed_html | |
| design | No | Design payload for embed_html | |
| reference | No | Target id for surface_ref | |
| refFlavour | No | Target flavour for surface_ref (e.g. affine:frame) | |
| width | No | Width for frame/edgeless_text/note | |
| height | No | Height for frame/edgeless_text/note | |
| background | No | Background for frame/note | |
| sourceId | No | Blob source id for image/attachment | |
| name | No | Attachment file name | |
| mimeType | No | Attachment mime type | |
| size | No | Attachment/image file size in bytes | |
| embed | No | Attachment embed mode | |
| rows | No | Table row count | |
| columns | No | Table column count | |
| latex | No | Latex expression | |
| level | No | Heading level for type=heading | |
| style | No | List style for type=list | |
| bookmarkStyle | No | Bookmark card style | |
| viewMode | No | Initial data view preset for type=database or type=data_view. Defaults: database=table, data_view=kanban | |
| checked | No | Todo state when type is todo | |
| language | No | Code language when type is code | |
| caption | No | Code caption when type is code | |
| strict | No | Strict validation mode (default true) | |
| placement | No | Optional insertion target/position |