Skip to main content

Notion

Connects to the Notion API for working with pages and databases. An agent can search and list accessible pages, read and create pages, append content, and query databases.

Add to an agent node's tools array with _node_type: "tool-notion". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
tokenOne of token / access_token requiredNotion integration secret, sent as Authorization: Bearer <token>. Typically a stored secret.
access_tokenOne of token / access_token requiredOAuth access token, used if token is not set. Typically populated from a stored OAuth connection via oauth_connection_id.

If neither field is set, the connector returns an error asking the user to connect a Notion workspace in Settings → Connections or set credentials.token.

{
"name": "notion",
"_node_type": "tool-notion",
"token": "{{ secret.NOTION_TOKEN }}"
}

Tools

notion_list_pages

List all Notion pages accessible to this integration. Use this first to find parent page IDs before creating a new page.

Parameters

ParameterTypeRequiredDescription
limitnumberNoMax pages to return (default 20)

Returns: A heading "Pages you can use as parents:" followed by - <title> (id: <id>) lines, or a message explaining that no pages were found and that the integration must be shared with at least one page.

Search pages and databases in Notion. Pass an empty query to list all accessible pages and find their IDs.

Parameters

ParameterTypeRequiredDescription
querystringYesSearch query for pages and databases. Pass empty string to list all accessible pages.

Returns: A list of - [<object type>] <title> (id: <id>) lines (up to 20 results), or "No results found.".

notion_get_page

Get a Notion page's title and content. Use notion_list_pages first if you don't have the page ID.

Parameters

ParameterTypeRequiredDescription
page_idstringYesNotion page ID (use notion_list_pages to find IDs)

Returns: The page title as a heading followed by the plain-text content of the page's top-level blocks (paragraph rich text). If block content can't be fetched, returns the title with an error note.

notion_create_page

Create a new page in Notion. You can omit parent_id — the tool will automatically find an accessible page to use as parent.

Parameters

ParameterTypeRequiredDescription
titlestringYesPage title
parent_idstringNoParent page ID. Call notion_list_pages first to get a valid ID. Leave empty to try workspace root (requires workspace-level access).
contentstringNoOptional initial page content as plain text

Returns: A confirmation message with the page title, new page ID, and URL. If creation fails and no parent_id was given, the error includes a tip to share a page with the integration.

notion_append_content

Append text content to an existing Notion page.

Parameters

ParameterTypeRequiredDescription
page_idstringYesPage ID to append content to
contentstringYesText content to append as a paragraph

Returns: "Content appended successfully.".

notion_query_database

Query a Notion database and return its entries.

Parameters

ParameterTypeRequiredDescription
database_idstringYesNotion database ID (use notion_search to find database IDs)
filterstringNoOptional JSON filter object

Returns: A list of - <title> (id: <id>) lines for up to 20 entries, or "Database is empty.".

Next