Roam Research

roam_update_block

Update a single block identified by its UID. Use this for individual block updates when you need to either replace the entire content or apply a transform pattern to modify specific parts of the content. NOTE on Roam-flavored markdown: For direct linking: use [[link]] syntax. For aliased linking, use alias syntax. Do not concatenate words in links/hashtags - correct: #[[multiple words]] #self-esteem (for typically hyphenated words).

Input Schema

NameRequiredDescriptionDefault
block_uidYesUID of the block to update
contentNoNew content for the block. If not provided, transform_pattern will be used.
transform_patternNoPattern to transform the current content. Used if content is not provided.

Input Schema (JSON Schema)

{ "oneOf": [ { "required": [ "content" ] }, { "required": [ "transform_pattern" ] } ], "properties": { "block_uid": { "description": "UID of the block to update", "type": "string" }, "content": { "description": "New content for the block. If not provided, transform_pattern will be used.", "type": "string" }, "transform_pattern": { "description": "Pattern to transform the current content. Used if content is not provided.", "properties": { "find": { "description": "Text or regex pattern to find", "type": "string" }, "global": { "default": true, "description": "Whether to replace all occurrences", "type": "boolean" }, "replace": { "description": "Text to replace with", "type": "string" } }, "required": [ "find", "replace" ], "type": "object" } }, "required": [ "block_uid" ], "type": "object" }