Skip to main content
notion.updatePageMarkdown insert, replace, or update page content through Notion’s markdown API.

Example

automations/notion-update-page-markdown.automation.ts

Inputs

Provide page_id and exactly one discriminated operation: insert_content, replace_content_range, update_content, or replace_content. Mixed operation bodies fail before execution, and insert_content cannot provide both after and position. Set allow_async for a background update; markdown is governed by Notion’s 500 KB request limit rather than the 2,000-character rich-text limit. Every input accepts a compatible signal, and an optional second argument can select a named account.

Output

Returns the updated page_markdown object with completeness metadata for a synchronous request. An asynchronous update returns an async_task; pass its id to getAsyncTask and respect poll_after_seconds while it is pending.