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

# Notion

> Notion centralizes notes, docs, wikis, and tasks in a unified workspace, letting teams build custom workflows for collaboration and knowledge management

Notion centralizes notes, docs, wikis, and tasks in a unified workspace, letting teams build custom workflows for collaboration and knowledge management

`notion` · **56 tools** · **8 triggers**

## Connect it

```bash
run auth notion
run auth notion --scope team    # shared with the organization
```

Or from the [Integrations page](https://app.boxd.sh/integrations) in the console. See [Connections](/guides/integrations/connections.md) for personal versus shared, and who may remove one.

## Use it

```bash
run notion          # common commands
run notion --all    # every command
```

```ts
import { notion } from "@boxd/run";
```

## Common tools

| Tool | What it does |
| - | - |
| `add-multiple-page-content` | Bulk-add content blocks to Notion. Text >2000 chars auto-splits. |
| `create-comment` | Adds a comment to a Notion page (via `parent_page_id`) OR to an existing discussion thread (via `discussion_id`); cannot create new discussion... |
| `create-database` | Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. |
| `create-page` | Creates a new page in a Notion workspace under a specified parent page or database. |
| `create-view` | Create a Notion view. |
| `create-view-query` | Create a Notion view query and return the first page of page references. |
| `delete-block` | Archives a Notion block, page, or database using its ID, which sets its 'archived' property to true (like moving to "Trash" in the UI) and allows it to be restored later. |
| `delete-view` | Delete a Notion view. |
| `delete-view-query` | Delete a cached Notion view query. |
| `fetch-all-block-contents` | Tool to fetch all child blocks for a given Notion block. Use when you need a complete listing of a block's children beyond a single page; supports... |
| `fetch-block-contents` | Retrieves a paginated list of direct, first-level child block objects along with contents for a given parent Notion block or page ID; use block IDs... |
| `fetch-comments` | Fetches unresolved comments for a specified Notion block or page ID. |
| `fetch-database` | Fetches a Notion database's structural metadata (properties, title, etc.) via its `database_id`, not the data entries; `database_id` must reference an existing database. |
| `fetch-row` | Retrieves a Notion database row's properties and metadata; use fetch\_block\_contents for page content blocks. |
| `get-about-me` | DEPRECATED: Use GetAboutUser instead. Retrieves the User object for the bot associated with the current Notion integration token, typically to obtain... |
| `get-about-user` | Retrieves detailed information about a specific Notion user, such as their name, avatar, and email, based on their unique user ID. |
| `get-page-markdown` | Retrieve a Notion page's full content rendered as Notion-flavored Markdown in a single API call. |
| `get-view-query-results` | Get a page of results from a cached Notion view query. |
| `insert-row-database` | Creates a new page (row) in a specified Notion database. Prerequisites: - Database must be shared with your integration - Property names AND types... |
| `insert-row-from-nl` | Creates a new row (page) in a Notion database from a natural language description. |
| `list-users` | Retrieves a paginated list of users (excluding guests) from the Notion workspace; the number of users returned per page may be less than the requested `page_size`. |
| `list-views` | List Notion views for a database or data source. |
| `move-page` | Tool to move a Notion page to a new parent (page or database). |
| `query-database` | Queries a Notion database to retrieve pages (rows). In Notion, databases are collections where each row is a page and columns are properties. |
| `query-database-with-filter` | Tool to query a Notion database with server-side filtering, sorting, and pagination. |

> [accordion] All 56 tools
>
> | Tool | What it does |
> | - | - |
> | `add-multiple-page-content` | Bulk-add content blocks to Notion. Text >2000 chars auto-splits. |
> | `add-page-content` | DEPRECATED: Use 'add\_multiple\_page\_content' for better performance. |
> | `append-block-children` | DEPRECATED: Use NOTION\_APPEND\_TEXT\_BLOCKS, NOTION\_APPEND\_TASK\_BLOCKS, NOTION\_APPEND\_CODE\_BLOCKS, NOTION\_APPEND\_MEDIA\_BLOCKS... |
> | `append-code-blocks` | Append code and technical blocks (code, quote, equation) to a Notion page. |
> | `append-layout-blocks` | Append layout blocks (divider, TOC, breadcrumb, columns) to a Notion page. |
> | `append-media-blocks` | Append media blocks (image, video, audio, file, pdf, embed, bookmark) to a Notion page. |
> | `append-table-blocks` | Append table blocks to a Notion page. Use for structured tabular data like spreadsheets, comparison charts, and status trackers. |
> | `append-task-blocks` | Append task blocks (to-do, toggle, callout) to a Notion page or block. |
> | `append-text-blocks` | Append text blocks (paragraphs, headings, lists) to a Notion page. |
> | `archive-page` | Archives (moves to trash) or unarchives (restores from trash) a specified Notion page. |
> | `create-comment` | Adds a comment to a Notion page (via `parent_page_id`) OR to an existing discussion thread (via `discussion_id`); cannot create new discussion... |
> | `create-database` | Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. |
> | `create-file-upload` | Tool to create a Notion FileUpload object and retrieve an upload URL. |
> | `create-page` | Creates a new page in a Notion workspace under a specified parent page or database. |
> | `create-view` | Create a Notion view. |
> | `create-view-query` | Create a Notion view query and return the first page of page references. |
> | `delete-block` | Archives a Notion block, page, or database using its ID, which sets its 'archived' property to true (like moving to "Trash" in the UI) and allows it to be restored later. |
> | `delete-view` | Delete a Notion view. |
> | `delete-view-query` | Delete a cached Notion view query. |
> | `duplicate-page` | Duplicates a Notion page, including all its content, properties, and nested blocks, under a specified parent page or workspace. |
> | `fetch-all-block-contents` | Tool to fetch all child blocks for a given Notion block. Use when you need a complete listing of a block's children beyond a single page; supports... |
> | `fetch-block-contents` | Retrieves a paginated list of direct, first-level child block objects along with contents for a given parent Notion block or page ID; use block IDs... |
> | `fetch-block-metadata` | Fetches metadata for a Notion block (including pages, which are special blocks) using its UUID. |
> | `fetch-comments` | Fetches unresolved comments for a specified Notion block or page ID. |
> | `fetch-data` | Fetches Notion items (pages and/or databases) from the Notion workspace, use this to get minimal data about the items in the workspace with a query... |
> | `fetch-database` | Fetches a Notion database's structural metadata (properties, title, etc.) via its `database_id`, not the data entries; `database_id` must reference an existing database. |
> | `fetch-row` | Retrieves a Notion database row's properties and metadata; use fetch\_block\_contents for page content blocks. |
> | `get-about-me` | DEPRECATED: Use GetAboutUser instead. Retrieves the User object for the bot associated with the current Notion integration token, typically to obtain... |
> | `get-about-user` | Retrieves detailed information about a specific Notion user, such as their name, avatar, and email, based on their unique user ID. |
> | `get-page-markdown` | Retrieve a Notion page's full content rendered as Notion-flavored Markdown in a single API call. |
> | `get-page-property-action` | Call this to get a specific property from a Notion page when you have a valid `page_id` and `property_id`; handles pagination for properties returning multiple items. |
> | `get-view-query-results` | Get a page of results from a cached Notion view query. |
> | `insert-row-database` | Creates a new page (row) in a specified Notion database. Prerequisites: - Database must be shared with your integration - Property names AND types... |
> | `insert-row-from-nl` | Creates a new row (page) in a Notion database from a natural language description. |
> | `list-data-source-templates` | Tool to list all templates for a Notion data source. Use when needing to discover template IDs/names for bulk page creation. |
> | `list-file-uploads` | Tool to retrieve file uploads for the current bot integration, sorted by most recent first. |
> | `list-users` | Retrieves a paginated list of users (excluding guests) from the Notion workspace; the number of users returned per page may be less than the requested `page_size`. |
> | `list-views` | List Notion views for a database or data source. |
> | `move-page` | Tool to move a Notion page to a new parent (page or database). |
> | `query-database` | Queries a Notion database to retrieve pages (rows). In Notion, databases are collections where each row is a page and columns are properties. |
> | `query-database-with-filter` | Tool to query a Notion database with server-side filtering, sorting, and pagination. |
> | `query-data-source` | Tool to query a Notion data source. Use when you need to retrieve pages or child data sources with filters, sorts, and pagination. |
> | `replace-page-content` | Safely replaces a page's child blocks by optionally backing up current content, deleting existing children, then appending new children in batches. |
> | `retrieve-comment` | Tool to retrieve a specific comment by its ID. Use when you have a comment ID and need to fetch its details. |
> | `retrieve-database-property` | Tool to retrieve a specific property object of a Notion database. |
> | `retrieve-file-upload` | Tool to retrieve details of a Notion File Upload object by its identifier. |
> | `retrieve-page` | Retrieve a Notion page's properties/metadata (not block content) by page\_id. |
> | `retrieve-view` | Retrieve a Notion view and its configuration. |
> | `search-page` | Searches Notion pages and databases by title. Use specific search terms to find items by title (primary approach). |
> | `send-file-upload` | Tool to transmit file contents to Notion for a file upload object. |
> | `update-block` | Updates existing Notion block's text content. ⚠️ CRITICAL: Content limited to 2000 chars. |
> | `update-page` | Update page properties, icon, cover, or archive status. IMPORTANT: Property names are workspace-specific and case-sensitive. |
> | `update-row-database` | Updates a specific row/page within a Notion database by its page UUID (row\_id). |
> | `update-schema-database` | Updates an existing Notion database's schema including title, description, and/or properties (columns). |
> | `update-view` | Update a Notion view. |
> | `upsert-row-database` | Tool to upsert rows in a Notion database by querying for existing rows and creating or updating them. |

## Triggers (8)

Subscribe with `.on(...)` in a script. A trigger with required configuration takes it as the second argument.

| Trigger | Needs | What fires it |
| - | - | - |
| Comment Created | nothing | Triggers when a new comment is created in Notion. |
| Database Created | nothing | Triggers when a new Notion database (the container) is created. |
| Data Source Created | nothing | Triggers when a new Notion data source is created. |
| Data Source Schema Updated | nothing | Triggers when a Notion data source's schema is updated. |
| Page Content Updated | nothing | Triggers when the body content of a Notion page is updated. |
| Page Created | nothing | Triggers when a new Notion page is created. |
| Page Properties Updated | nothing | Triggers when properties of a Notion page are updated. |
| View Created | nothing | Triggers when a new Notion view is created. |

[Open Notion in the console →](https://app.boxd.sh/integrations/detail/notion)
