capabilities.work

Edit and Optionally Delete a Page Block

A 3-step recipe with Notion. We can help you get access.

Recipe · 3 steps

Edit and Optionally Delete a Page Block

with Notion

Update the first block of a page and optionally archive it.

  1. Retrieve the page's child blocks and capture the ID of the first block to operate on.
  2. Update the first block's paragraph rich text with the new content.
  3. Archive (delete) the updated block when cleanup was requested.
What you'll need to have ready
  • token: Notion integration token passed as a bearer credential.
  • notionVersion: The Notion API version date sent in the Notion-Version header.
  • pageId: The ID of the page whose first block will be edited.
  • newText: The new plain-text content for the first block's paragraph.
  • deleteAfter: When true, archive (delete) the block after updating it.
For your developer

Arazzo workflow notion:block-edit-cleanup, 3 operations: retrieveBlockChildren → updateBlock → deleteBlock. Specs on APIs.io.