Automate Notion with TypeScript

Create, query, and update Notion content across pages, blocks, databases, data sources, comments, views, files, users, and agents. Start automations from every current Notion webhook event.

archive-completed-notion-pages.automation.ts
import { automation } from "automate.ax"
import { notion } from "automate.ax/notion"

export default automation("Archive completed Notion pages", () => {
  const updated = notion.onPagePropertiesUpdated()

  notion.updatePage({
    page_id: updated.entity.id,
    in_trash: true,
  })
})

What you can do

Actions

  • Create and update pages, blocks, databases, data sources, and views
  • Manage comments, meeting notes, markdown, and file uploads
  • Search workspace content and retrieve users or custom emoji
  • Query and manage Notion agents and sessions

Triggers

  • Page, database, and data source lifecycle
  • Comment and view changes
  • File upload lifecycle
  • Broad Notion webhook events

Start automating with Notion today

Start building