CortexDB Docs
Connectors

Notion Connector

Ingest Notion pages and comments into CortexDB.

Tails Notion pages and comments and writes them to CortexDB as experiences, polling on last_edited_time.

Two ways to run this connector

Self-hostedpip install 'cortexdb-connectors[notion]' then cortexdb-sync sync notion. Managed — CortexDB runs the connector as a worker. See the Connectors overview.

1. Prepare credentials

Create an internal integration at notion.so/my-integrations, copy its token, and share the pages / databases you want ingested with the integration (Notion integrations only see explicitly shared content).

What gets written

Each page (as a document) and comment becomes a POST /v1/experience on the resolved scope (default org:<org>/source:notion), with an entity reference to the page.

Corrected fields

  • The idempotency_key is notion:<page_id>:<last_edited_time> (a re-edit lands as a new version).
  • Comments link to their page via a thread=… label, not context.preceded_by.

Run it yourself

pip install 'cortexdb-connectors[notion]'
pip install cortexdb-cli && cortexdb init

export NOTION_TOKEN=secret_...            # required (shared with the pages you want ingested)

cortexdb-sync --api-url http://localhost:3141 sync notion
cortexdb-sync --api-url http://localhost:3141 watch notion --interval 300

See also

On this page