> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Notion

> Manage Notion pages, databases, data sources, comments, views, file uploads, agents, and verified workspace events.

The integration targets Notion API version `2026-03-11` and preserves Notion's snake-case request and response fields. Inputs and outputs use the official `@notionhq/client` types.

## Connect to Notion

OAuth is the preferred connection. It supports actions and webhook triggers across content, comments, users, and Notion agents. A personal access token can run actions with its Notion API capability, but it can't own a webhook subscription or list every workspace user.

Use `notionAccount("name")` to select a named project account. Each action declares its least Notion capability, and deployment fails when the selected connection can't satisfy it.

## Example

```ts automations/archive-completed-notion-pages.automation.ts theme={null}
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,
  })
})
```

Every authenticated webhook delivery starts an ordinary root context. Use correlation when a later Notion event belongs with an earlier action occurrence.

Notion's current limits are checked before execution, including cursor page sizes, array bounds, URL and expression lengths, current field names, and file-upload mode invariants. The client retries rate limits and safe transient failures according to the official SDK policy.

Notion webhooks require OAuth. Automate.ax verifies the signature over the exact request body, routes by stable workspace ID, and deduplicates retries by Notion event ID.

## Provider setup

Configure the OAuth client ID and secret plus the verification token for the static Notion webhook subscription. Notion sends the verification token during subscription setup; capture it with a disposable secret-safe endpoint, configure `NOTION_WEBHOOK_VERIFICATION_TOKEN`, then set the production callback to `/api/v1/events/notion`.

Notion agent APIs are public beta and additionally require a workspace plan and integration access that supports agents.

## Exports

```ts theme={null}
import {
  notion,
  notionAccount,
  NotionClient,
  getNotionApi,
} from "automate.ax/notion"
```

* `notion` contains the packaged Notion actions and triggers.
* `notionAccount("name")` selects a named Notion connection.
* `NotionClient` is the official Notion client class returned by `getNotionApi`.
* `getNotionApi` creates the authenticated Notion API helper for a custom account-backed action.

## Triggers

* [On Notion event](/reference/integrations/notion/triggers/on-event)
* [On Notion comment created](/reference/integrations/notion/triggers/on-comment-created)
* [On Notion comment deleted](/reference/integrations/notion/triggers/on-comment-deleted)
* [On Notion comment updated](/reference/integrations/notion/triggers/on-comment-updated)
* [On Notion database created](/reference/integrations/notion/triggers/on-database-created)
* [On Notion database deleted](/reference/integrations/notion/triggers/on-database-deleted)
* [On Notion database moved](/reference/integrations/notion/triggers/on-database-moved)
* [On Notion database restored](/reference/integrations/notion/triggers/on-database-undeleted)
* [On Notion data source content updated](/reference/integrations/notion/triggers/on-data-source-content-updated)
* [On Notion data source created](/reference/integrations/notion/triggers/on-data-source-created)
* [On Notion data source deleted](/reference/integrations/notion/triggers/on-data-source-deleted)
* [On Notion data source moved](/reference/integrations/notion/triggers/on-data-source-moved)
* [On Notion data source schema updated](/reference/integrations/notion/triggers/on-data-source-schema-updated)
* [On Notion data source restored](/reference/integrations/notion/triggers/on-data-source-undeleted)
* [On Notion file upload completed](/reference/integrations/notion/triggers/on-file-upload-completed)
* [On Notion file upload created](/reference/integrations/notion/triggers/on-file-upload-created)
* [On Notion file upload expired](/reference/integrations/notion/triggers/on-file-upload-expired)
* [On Notion file upload failed](/reference/integrations/notion/triggers/on-file-upload-failed)
* [On Notion page content updated](/reference/integrations/notion/triggers/on-page-content-updated)
* [On Notion page created](/reference/integrations/notion/triggers/on-page-created)
* [On Notion page deleted](/reference/integrations/notion/triggers/on-page-deleted)
* [On Notion page locked](/reference/integrations/notion/triggers/on-page-locked)
* [On Notion page moved](/reference/integrations/notion/triggers/on-page-moved)
* [On Notion page properties updated](/reference/integrations/notion/triggers/on-page-properties-updated)
* [On Notion page transcript deleted](/reference/integrations/notion/triggers/on-page-transcript-deleted)
* [On Notion page restored](/reference/integrations/notion/triggers/on-page-undeleted)
* [On Notion page unlocked](/reference/integrations/notion/triggers/on-page-unlocked)
* [On Notion view created](/reference/integrations/notion/triggers/on-view-created)
* [On Notion view deleted](/reference/integrations/notion/triggers/on-view-deleted)
* [On Notion view updated](/reference/integrations/notion/triggers/on-view-updated)

## Actions

* [Get Notion background task](/reference/integrations/notion/actions/get-async-task)
* [Get Notion block](/reference/integrations/notion/actions/get-block)
* [List Notion block children](/reference/integrations/notion/actions/list-block-children)
* [Update Notion block](/reference/integrations/notion/actions/update-block)
* [Delete Notion block](/reference/integrations/notion/actions/delete-block)
* [Append Notion block children](/reference/integrations/notion/actions/append-block-children)
* [Create Notion meeting note](/reference/integrations/notion/actions/create-meeting-note)
* [Query Notion meeting notes](/reference/integrations/notion/actions/query-meeting-notes)
* [Create Notion page](/reference/integrations/notion/actions/create-page)
* [Get Notion page](/reference/integrations/notion/actions/get-page)
* [Get Notion page property](/reference/integrations/notion/actions/get-page-property)
* [Get Notion page markdown](/reference/integrations/notion/actions/get-page-markdown)
* [Update Notion page](/reference/integrations/notion/actions/update-page)
* [Move Notion page](/reference/integrations/notion/actions/move-page)
* [Update Notion page markdown](/reference/integrations/notion/actions/update-page-markdown)
* [Create Notion database](/reference/integrations/notion/actions/create-database)
* [Get Notion database](/reference/integrations/notion/actions/get-database)
* [Update Notion database](/reference/integrations/notion/actions/update-database)
* [Create Notion data source](/reference/integrations/notion/actions/create-data-source)
* [Get Notion data source](/reference/integrations/notion/actions/get-data-source)
* [List Notion data source templates](/reference/integrations/notion/actions/list-data-source-templates)
* [Query Notion data source](/reference/integrations/notion/actions/query-data-source)
* [Update Notion data source](/reference/integrations/notion/actions/update-data-source)
* [Create Notion comment](/reference/integrations/notion/actions/create-comment)
* [Update Notion comment](/reference/integrations/notion/actions/update-comment)
* [Delete Notion comment](/reference/integrations/notion/actions/delete-comment)
* [Get Notion comment](/reference/integrations/notion/actions/get-comment)
* [List Notion comments](/reference/integrations/notion/actions/list-comments)
* [Create Notion view](/reference/integrations/notion/actions/create-view)
* [Get Notion view](/reference/integrations/notion/actions/get-view)
* [List Notion views](/reference/integrations/notion/actions/list-views)
* [Create Notion view query](/reference/integrations/notion/actions/create-view-query)
* [Get Notion view query results](/reference/integrations/notion/actions/get-view-query-results)
* [Delete Notion view query](/reference/integrations/notion/actions/delete-view-query)
* [Update Notion view](/reference/integrations/notion/actions/update-view)
* [Delete Notion view](/reference/integrations/notion/actions/delete-view)
* [Create Notion file upload](/reference/integrations/notion/actions/create-file-upload)
* [Send Notion file upload](/reference/integrations/notion/actions/send-file-upload)
* [Complete Notion file upload](/reference/integrations/notion/actions/complete-file-upload)
* [Get Notion file upload](/reference/integrations/notion/actions/get-file-upload)
* [List Notion file uploads](/reference/integrations/notion/actions/list-file-uploads)
* [Search Notion](/reference/integrations/notion/actions/search)
* [Get current Notion user](/reference/integrations/notion/actions/get-current-user)
* [Get Notion user](/reference/integrations/notion/actions/get-user)
* [List Notion users](/reference/integrations/notion/actions/list-users)
* [List Notion custom emoji](/reference/integrations/notion/actions/list-custom-emojis)
* [Query Notion agents](/reference/integrations/notion/actions/query-agents)
* [Get Notion agent](/reference/integrations/notion/actions/get-agent)
* [Get Notion agent insights](/reference/integrations/notion/actions/get-agent-insights)
* [Update Notion agent status](/reference/integrations/notion/actions/update-agent-status)
* [Update Notion agent credit limit](/reference/integrations/notion/actions/update-agent-credit-limit)
* [Delete Notion agent](/reference/integrations/notion/actions/delete-agent)
* [Batch manage Notion agents](/reference/integrations/notion/actions/batch-manage-agents)
* [Create or update Notion session](/reference/integrations/notion/actions/create-or-update-session)
* [Get Notion session](/reference/integrations/notion/actions/get-session)
* [Query Notion sessions](/reference/integrations/notion/actions/query-sessions)
* [Query Notion session events](/reference/integrations/notion/actions/query-session-events)
* [Cancel Notion session](/reference/integrations/notion/actions/cancel-session)
