> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/docs-knowledge/notion.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Notion

Notion is a workspace for notes, docs and databases. Create pages, databases and rows, add content blocks and comments, and search.

![Notion logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-300a7c297740a34f4931f8d052de1857ffbd6ef7%2Fnotion.png?alt=media)

|                    |                                                                                  |
| ------------------ | -------------------------------------------------------------------------------- |
| **Category**       | [Docs and knowledge](https://docs.fastn.ai/connectors/catalog/docs-knowledge.md) |
| **Website**        | [notion.so](https://notion.so)                                                   |
| **Authentication** | OAuth 2.0                                                                        |
| **Slug**           | `notion`                                                                         |
| **On fastn.ai**    | [Embed Notion in your product](https://fastn.ai/integrations/notion)             |

## Setup

Your customers sign in to Notion through Fastn's own OAuth app, so nothing needs setting up first. To show your own app on the consent screen instead, add your OAuth app on the connector's **Auth** tab under **Manage providers**.

## Connect in Fastn

Your customers connect Notion from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Notion**.
2. Select **Connect** on the Notion card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to Notion and approve access in the window that opens.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Notion's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Append Block Children</td><td><code>appendBlockChildren</code></td><td>Append new child blocks to a Notion page or block</td></tr><tr><td>Append Block Children (Raw)</td><td><code>appendBlockChildrenRaw</code></td><td>Append fully-formed Notion block objects to a page or block. Unlike appendBlockChildren, which wraps a single plain-text string in one paragraph, this accepts the raw children array so callers can send headings, bulleted_list_items, dividers and mixed rich_text. Pass children exactly as the Notion API expects, e.g. [{object:"block",type:"heading_3",heading_3:{rich_text:[{type:"text",text:{content:"Title"}}]}}]. Max 100 blocks per call. Returns the list of created block objects.</td></tr><tr><td>Complete File Upload</td><td><code>completeFileUpload</code></td><td>Finalize a multi_part file upload after all parts have been sent (POST file_uploads/{file_upload_id}/complete). No request body. Only used for multi_part mode; single_part and external_url uploads do not need this call. Returns the file_upload object with status 'uploaded'.</td></tr><tr><td>Create Comment</td><td><code>createComment</code></td><td>Create a comment on a Notion page</td></tr><tr><td>Create Data Source</td><td><code>createDataSource</code></td><td>Add an additional data source to an existing Notion database. A standard table view is automatically created alongside the new data source.</td></tr><tr><td>Create Database</td><td><code>createDatabase</code></td><td>LEGACY - create a new database in Notion as a child of a page, with a single title column named "Name". Deliberately pinned to Notion-Version 2022-06-28. Verified live: this same request body is still ACCEPTED on 2026-03-11 (HTTP 200), but the response body there omits the properties (column schema) object that this action's outputContract declares and instead returns a data_sources[] array, so the version is held back to keep the documented response correct. On current API versions a database is a container of data sources: after creating one, add or inspect its schema with createDataSource / retrieveDataSource / updateDataSource, and add rows with createPageRaw using a data_source_id parent.</td></tr><tr><td>Create Database Row (Plain Text)</td><td><code>createDatabaseRowPlainText</code></td><td>Create a row (page) in a Notion database from flat plain-text inputs. The title goes into the database's title column (titleProperty, e.g. "Name"); the plain-text description becomes one paragraph in the page body. status and priority are optional objects sent under statusProperty / priorityProperty ({status:{name}} / {select:{name}}). Unset optional fields are omitted. Returns the created page.</td></tr><tr><td>Create File Upload</td><td><code>createFileUpload</code></td><td>Start a file upload (POST file_uploads). Returns a file_upload object (status 'pending') whose upload_url is then used by sendFileUpload to transmit bytes. mode defaults to single_part; for files >20MB use multi_part with filename + number_of_parts; for external_url provide an HTTPS external_url. Required body fields depend on mode; this action templates only the always-safe defaults (mode). Pass filename/content_type/number_of_parts/external_url via input as needed.</td></tr><tr><td>Create Page</td><td><code>createPage</code></td><td>Create a new page in Notion as a child of another PAGE. Note: parentId is always sent as parent.page_id, so this action only supports page parents, not database parents. To create a row in a database use createPageRaw with a parent of {"data_source_id":"&#x3C;id>"} (Notion 2025-09-03 and later) - a database parent is no longer addressed by database_id on current API versions.</td></tr><tr><td>Create Page (Raw)</td><td><code>createPageRaw</code></td><td>Create a Notion page from a fully-formed request body. Unlike createPage (page parents only), this sends parent/properties/children verbatim and supports every parent type: {"page_id":"..."} for a child page, {"data_source_id":"..."} for a row in a data source (preferred on Notion 2025-09-03+), and {"database_id":"..."} which is still accepted and auto-resolves to that database's data source when it has only one. For a database or data source parent the title key MUST match that data source's real title column (resolve it with retrieveDataSource and pick the property whose type is "title") - a hardcoded "title" key returns validation_error. children accepts up to 100 fully-formed Notion block objects. Runs on Notion-Version 2026-03-11; all three parent forms verified live. Returns the created page object.</td></tr></tbody></table>

<details>

<summary>View 26 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Delete Block</td><td><code>deleteBlock</code></td><td>Archive (delete) a Notion block</td></tr><tr><td>Get Block</td><td><code>getBlock</code></td><td>Retrieve a single block from Notion by its ID</td></tr><tr><td>Get Block Children</td><td><code>getBlockChildren</code></td><td>Retrieve all child blocks of a Notion block or page</td></tr><tr><td>Get Bot User</td><td><code>getBotUser</code></td><td>Retrieve the bot user associated with the current OAuth token</td></tr><tr><td>Get Comment</td><td><code>getComment</code></td><td>Retrieve a single Notion comment by its comment_id (GET comments/{comment_id}). Pinned to Notion-Version 2026-03-11, consistent with the rest of the connector. Verified live on both 2022-06-28 and 2026-03-11: the endpoint is available on BOTH, so the earlier "requires 2026-03-11 or later" note in this description was incorrect. Returns the comment object with rich_text, parent, discussion_id.</td></tr><tr><td>Get Database</td><td><code>getDatabase</code></td><td>Retrieve a Notion database by its ID. LEGACY - deliberately pinned to Notion-Version 2022-06-28. Verified live: on 2026-03-11 this endpoint still It is therefore kept on 2022-06-28 so the documented response stays correct. For the column schema on current API versions use retrieveDataSource with a data_source_id; list a database's data sources by reading data_sources[] from a 2026-03-11 call. Known limitation: on 2022-06-28 a database with MULTIPLE data sources returns "Databases with multiple data sources are not supported in this API version" - use retrieveDataSource for those.</td></tr><tr><td>Get File Upload</td><td><code>getFileUpload</code></td><td>Retrieve a single file_upload object by its id (GET file_uploads/{file_upload_id}). Use to poll upload status. Returns the file_upload object.</td></tr><tr><td>Get Page</td><td><code>getPage</code></td><td>Retrieve a Notion page by its ID</td></tr><tr><td>Get Page Property</td><td><code>getPageProperty</code></td><td>Retrieve a specific property of a Notion page</td></tr><tr><td>Get User</td><td><code>getUser</code></td><td>Retrieve a specific Notion user by their ID</td></tr><tr><td>List Comments</td><td><code>listComments</code></td><td>Retrieve all comments on a Notion page or block</td></tr><tr><td>List Data Source Templates</td><td><code>listDataSourceTemplates</code></td><td>Retrieves details of all page templates available for a given data source. Results are paginated up to 100 per page.</td></tr><tr><td>List File Uploads</td><td><code>listFileUploads</code></td><td>List file_upload objects for the workspace (GET file_uploads). Supports filtering by status and cursor pagination. Returns a paginated list envelope with results[]. Query params (status, start_cursor, page_size) are auto-appended on GET from the inputContract.</td></tr><tr><td>List Users</td><td><code>listUsers</code></td><td>List all users in a Notion workspace</td></tr><tr><td>Query Data Source</td><td><code>queryDataSource</code></td><td>Gets a paginated list of pages (rows) contained in a data source, filtered and sorted according to the provided conditions. Supports up to 10,000 results per query.</td></tr><tr><td>Query Database</td><td><code>queryDatabase</code></td><td>LEGACY - query a Notion database and return matching pages. This endpoint was REMOVED in Notion API version 2025-09-03; verified live that it It is therefore deliberately pinned to Notion-Version 2022-06-28, which still works. REPLACEMENT: use queryDataSource, which runs on 2026-03-11 and also supports filter, sorts and filter_properties. Get a data_source_id from getDatabase's data_sources[] or from a relation property. Known limitation of this legacy action: a database with MULTIPLE data sources returns "Databases with multiple data sources are not supported in this API version" - those must use queryDataSource.</td></tr><tr><td>Query Database Rows (Paged)</td><td><code>queryDatabaseRows</code></td><td>List rows (pages) of a Notion database, newest first, with cursor pagination: Only page_size and start_cursor are sent in the body, so extra inputs never leak into the request. Returns results plus next_cursor / has_more.</td></tr><tr><td>Retrieve Data Source</td><td><code>retrieveDataSource</code></td><td>Retrieves a data source object - including its properties schema (columns) - for a provided data source ID. Use this to inspect the structure of a data source before querying its rows.</td></tr><tr><td>Search</td><td><code>search</code></td><td>Search all pages and databases in a Notion workspace by title. Deliberately pinned to Notion-Version 2022-06-28. Verified live: on 2026-03-11 an unfiltered search stillvalue "database" is REJECTED with HTTP 400 validation_error ("should be `page` or `data_source`"), and the response envelope changes from type "page_or_database" to "page_or_data_source". Keeping 2022-06-28 preserves both the filter input and the documented response for existing callers. To search data sources on a current API version, a new action using filter.value "data_source" would be needed.</td></tr><tr><td>Send File Upload</td><td><code>sendFileUpload</code></td><td>Transmit file bytes for a pending file upload (POST file_uploads/{file_upload_id}/send). Uses multipart/form-data with a 'file' part (raw binary, provided via the Fastn FileRef input field 'file') and, for multi_part uploads, an optional 'part_number' (1-1000). EXECUTOR LIMITATION: the Fastn executor's multipart/form-data + FileRef support may not transmit binary bodies correctly; if execution fails on the multipart body (not on auth/routing), classify as BLOCKED (executor multipart limitation) rather than fail. Returns the updated file_upload object.</td></tr><tr><td>Update Block</td><td><code>updateBlock</code></td><td>Update the content of a Notion block</td></tr><tr><td>Update Data Source</td><td><code>updateDataSource</code></td><td>Updates a Notion data source object - its properties schema, title, icon, trash status, or parent database. Returns the updated data source object.</td></tr><tr><td>Update Database</td><td><code>updateDatabase</code></td><td>LEGACY - rename a Notion database. Deliberately pinned to Notion-Version 2022-06-28. Verified live: this title-only PATCH is still ACCEPTED on 2026-03-11 (HTTP 200), but the response there omits the properties (column schema) object this action's outputContract declares, so the version is held back to keep the documented response correct. Note the body template sends only the title, so the "archived" input is currently ignored (archiving is not actually applied). To change a database's COLUMN SCHEMA on current API versions use updateDataSource, whose properties map edits the data source that owns the columns; a database itself no longer carries a schema.</td></tr><tr><td>Update Database Row (Plain Text)</td><td><code>updateDatabaseRowPlainText</code></td><td>Partially update a Notion database row (page) by pageId. titleValue, status and priority are optional objects written under titleProperty / statusProperty / priorityProperty ({title:[{text:{content}}]} / {status:{name}} / {select:{name}}); unset ones are omitted and keep their value. Returns the updated page.</td></tr><tr><td>Update Database Row Title</td><td><code>updateDatabaseRowTitle</code></td><td>Set the title of a Notion database row (page) from plain text. titleProperty is the database's title column (usually Name), title is the new text. Returns the updated page. To set several columns or rich values, use Update Database Row (Plain Text).</td></tr><tr><td>Update Page</td><td><code>updatePage</code></td><td>Update a Notion page's properties or archive it. Deliberately pinned to Notion-Version 2022-06-28. Verified live: on 2026-03-11 this action's REQUIRED "archived" input is rejected with HTTP 400 validation_error ("body.archived should be not present") because Notion renamed that field to "in_trash" on newer versions. Keeping 2022-06-28 preserves the existing input contract. Moving this action forward would require accepting in_trash instead, which is a breaking input change and so needs a new action version rather than an edit.</td></tr></tbody></table>

</details>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Comment Created</td><td><code>comment.created</code></td><td>A comment was created on a page or block.</td></tr><tr><td>Comment Deleted</td><td><code>comment.deleted</code></td><td>A comment was deleted.</td></tr><tr><td>Comment Updated</td><td><code>comment.updated</code></td><td>A comment was edited.</td></tr><tr><td>Database Content Updated</td><td><code>database.content_updated</code></td><td>Rows/content within a database were updated.</td></tr><tr><td>Database Created</td><td><code>database.created</code></td><td>A database was created.</td></tr><tr><td>Database Deleted</td><td><code>database.deleted</code></td><td>A database was moved to trash (deleted).</td></tr><tr><td>Database Moved</td><td><code>database.moved</code></td><td>A database was moved to a different parent.</td></tr><tr><td>Database Schema Updated</td><td><code>database.schema_updated</code></td><td>The property schema of a database was changed.</td></tr><tr><td>Database Undeleted</td><td><code>database.undeleted</code></td><td>A database was restored from trash.</td></tr><tr><td>Page Content Updated</td><td><code>page.content_updated</code></td><td>The block content of a page was updated.</td></tr></tbody></table>

<details>

<summary>View 7 more events</summary>

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Page Created</td><td><code>page.created</code></td><td>A page was created in the workspace.</td></tr><tr><td>Page Deleted</td><td><code>page.deleted</code></td><td>A page was moved to trash (deleted).</td></tr><tr><td>Page Locked</td><td><code>page.locked</code></td><td>A page was locked.</td></tr><tr><td>Page Moved</td><td><code>page.moved</code></td><td>A page was moved to a different parent.</td></tr><tr><td>Page Properties Updated</td><td><code>page.properties_updated</code></td><td>One or more properties of a page were updated.</td></tr><tr><td>Page Undeleted</td><td><code>page.undeleted</code></td><td>A page was restored from trash.</td></tr><tr><td>Page Unlocked</td><td><code>page.unlocked</code></td><td>A page was unlocked.</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/docs-knowledge/notion.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
