Esta página no está disponible en español. Se muestra la versión en inglés.

Notion connector

Search, create, update, and comment on Notion pages and database rows from AgentRuntime workflows.

En esta página

The notion connector lets your workflows read and write Notion through an internal integration token. Use it to keep a Notion database in step with what your workflows do: log runs, track tickets, publish drafts, or look up reference data.

Typical uses:

  • Add a row to a "Run log" database every time a workflow finishes.
  • Create a draft page from model output, then append approved text after a person signs off.
  • Look up rows in a database and hand them to a model as grounded context.

Prerequisites

  • A Notion workspace where you can create an integration.
  • An internal integration and its secret token, created in Notion's integration settings.
  • Each page or database you want to use shared with that integration. The integration only sees pages you explicitly share.
  • For the comment tools, the integration needs the Read comments and Insert comments capabilities in its Notion settings.
  • The project_contributor role or higher in AgentRuntime.

Connect in AgentRuntime

  1. Create a Notion integration

    Open Notion's integrations page (notion.so/my-integrations), create a new internal integration for your workspace, and copy its secret token. If the screens have changed, follow Notion's own documentation on creating an integration.

  2. Share pages with the integration

    In Notion, open each database or parent page you want workflows to use, open its ... menu, choose Connect to, and select your integration. Pages you do not share are invisible to the connector.

  3. Create a connection

    In the Console, go to Connections and click New custom connection. Enter a display name, then under Credentials set Key to notion_access_token and Value to your integration token. Click Save.

  4. Add the MCP instance

    Go to MCP, click Add connectors, click the notion connector and then Add to workspace, then open Instance config. Pick your connection, set the profile to active, and save.

  5. Smoke test

    In Workflow Studio, add a connector step (type mcp) with tool_name notion_search and an empty tool_args object, then run it. A list of the pages and databases you shared means the connection works. Copy a database ID from the result for the steps below.

Nota

Any argument that takes a Notion ID accepts a plain UUID, a 32-character ID without dashes, or a pasted Notion page URL. Query strings on a URL are ignored.

What you can build

  • Run log database. At the end of a workflow, notion_create_database_item adds a row with the run ID and status.
  • Content pipeline. A model drafts text, notion_create_page creates it under a parent page, a human step asks for review, and notion_append_to_page adds the approved text.
  • Ticket sync. After you create an issue in another tool, notion_create_database_item records its URL and owner in a Notion tracker.
  • Knowledge lookup. notion_find_database_item returns matching rows that you pass to a model so its answer is grounded in your Notion data.

Tools

Tools marked Writes change data in Notion. The rest only read.

ToolDescriptionAccess
notion_searchSearch pages and databases shared with the integrationRead
notion_find_pageFind pages by title (substring by default, or exact match)Read
notion_retrieve_databaseGet a database's schema and property definitionsRead
notion_find_database_itemQuery database rows with a Notion filter objectRead
notion_get_page_or_block_childrenList the child blocks of a page or blockRead
notion_get_page_commentsList comments on a pageRead
notion_get_usersList workspace users, or fetch one user (user_id self returns the token's own user)Read
notion_get_async_taskCheck the status of an async task returned by a Notion operationRead
notion_create_database_itemCreate a row in a databaseWrites
notion_update_database_itemUpdate properties on a database rowWrites
notion_archive_database_itemArchive a database rowWrites
notion_restore_database_itemRestore an archived database rowWrites
notion_create_pageCreate a page under a parent pageWrites
notion_move_pageMove a page under a new parent page or data sourceWrites
notion_duplicate_pageCopy a page's properties and blocks to a new pageWrites
notion_append_to_pageAppend content blocks to a page or blockWrites
notion_add_commentAdd a comment to a pageWrites
notion_custom_api_callSend any request to the Notion REST APIWrites (can do anything the token allows)

Arguments, required ones first:

ToolArguments
notion_searchAll optional: query, object_type (page or database), page_size (default 20, max 100)
notion_find_pagetitle (required), exact_match, limit (default 10, max 100)
notion_retrieve_databasedatabase_id (required)
notion_find_database_itemdatabase_id, filter (both required), page_size, start_cursor
notion_create_database_itemdatabase_id, properties (both required), content (plain-text body)
notion_update_database_itempage_id, properties (both required)
notion_archive_database_item, notion_restore_database_itempage_id (required)
notion_create_pageparent_page_id (required), title, content, properties, children
notion_move_pagepage_id, parent_type (page_id or data_source_id), parent_id (all required)
notion_duplicate_pagepage_id (required), parent_page_id, parent_data_source_id, title_suffix (default Copy), depth (default 1, max 3)
notion_append_to_pageblock_id (required), then content (plain text) or children (Notion block objects)
notion_get_page_or_block_childrenblock_id (required), start_cursor, depth (default 1)
notion_add_commentpage_id, comment_text (both required)
notion_get_page_commentspage_id (required)
notion_get_usersAll optional: user_id, query, page_size (default 100, max 100), start_cursor
notion_get_async_tasktask_id (required)
notion_custom_api_callmethod and path (starts with /) required; query, body

properties and filter use Notion's own JSON shapes. Run notion_retrieve_database first to see the exact property names and types.

Example

Add a row to a database when a run finishes. The database needs a title property named Name and a select property named Status:

{
  "id": "log-run",
  "type": "mcp",
  "name": "Log run in Notion",
  "tool_name": "notion_create_database_item",
  "tool_args": {
    "database_id": "11111111-2222-3333-4444-555555555555",
    "properties": {
      "Name": { "title": [{ "text": { "content": "Run {{input.run_id}}" } }] },
      "Status": { "select": { "name": "Complete" } }
    }
  },
  "timeout_s": 30
}

In Workflow Studio you pick the MCP instance on the step, and Studio fills in the instance reference for you.

Configuration

These are the keys the connector reads. A custom connection whose field names match these keys is wired automatically on Instance config.

KeyRequiredDefaultDescription
notion_access_tokenYesnoneNotion internal integration token
notion_api_baseNohttps://api.notion.com/v1Notion API base URL
notion_notion_versionNo2025-09-03Value sent in the Notion-Version header

Troubleshooting

IssueFix
Notion API 404 or object_not_foundThe page or database is not shared with your integration. In Notion, use Connect to on the page, then retry.
Search returns nothingThe integration sees only pages you shared. Share at least one page and try again.
Property or filter error from NotionNames and types must match the database. Run notion_retrieve_database and copy them exactly.
invalid Notion idThe value is not a UUID or a Notion URL containing one. Copy the ID again from the page URL.
Notion API 403 on a comment toolEnable Read comments and Insert comments on the integration in Notion.
Rate limiting (429)The connector waits and retries. Space out bulk writes if it keeps happening.
Editar esta páginaagentruntime-io/agentruntime-docs