Skip to main content

Notion Integration

Import your Notion pages and databases as searchable Trix memories.

Overview

The Notion integration imports your pages and databases as searchable Trix memories. Content is converted to markdown and synchronized incrementally.

  • Page Sync - Import full page content as markdown
  • Database Sync - Import database structure and metadata
  • Incremental Updates - Only sync changed content
  • Block Conversion - Headings, lists, code blocks, callouts, and more

Connecting Notion

Via CLI (Recommended)

connect.sh
trix integrations connect notion

This opens your browser for OAuth authorization. Grant Trix access to your Notion workspace.

Via API

initiate.sh
# Initiate OAuth flow
curl -X POST https://api.trixdb.com/v1/integrations/oauth/initiate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider": "notion"}'

What Gets Synced

Pages

Each Notion page becomes a memory with:

Memory FieldSource
contentFull page content as markdown
content_typemarkdown
metadata.sourcenotion
metadata.notion_urlPage URL
tags["notion", "page"]

Supported Block Types

Notion BlockMarkdown Output
ParagraphPlain text
Heading 1/2/3#, ##, ###
Bulleted list- item
Numbered list1. item
To-do[ ] or [x]
CodeFenced code block
Quote> text
Image![caption](url)

Syncing Content

sync.sh
# List connections
trix integrations list

# Incremental sync (only changed pages)
trix integrations sync conn_abc123

# Full sync (re-import everything)
trix integrations sync conn_abc123 --full

# Check status
trix integrations status conn_abc123

API Reference

api.sh
# List connections
curl -X GET https://api.trixdb.com/v1/integrations/connections \
  -H "Authorization: Bearer YOUR_API_KEY"

# Trigger sync
curl -X POST https://api.trixdb.com/v1/integrations/connections/{id}/sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job_type": "incremental"}'

# Disconnect
curl -X DELETE https://api.trixdb.com/v1/integrations/connections/{id} \
  -H "Authorization: Bearer YOUR_API_KEY"

Rate Limits

Notion has strict API rate limits. Trix handles this automatically:

  • 3 requests/second to Notion API
  • Automatic retry with exponential backoff
  • Sync jobs queue and process sequentially

Troubleshooting

Pages Not Appearing

  1. Check if pages are shared with your Notion integration
  2. In Notion: Settings → Connections → Find Trix → Manage access
  3. Add the pages/databases you want to sync

Reconnecting

reconnect.sh
trix integrations disconnect conn_abc123
trix integrations connect notion

Notion tokens don't expire, but if you revoke access in Notion settings, you'll need to reconnect.