Notion Connector

Stop switching between tabs to find information in Notion. Connect your workspace to RAGaaS and instantly search across all your Notion pages with AI-powered understanding.

Common Challenges

  • Keyword-only search misses relevant content
  • Information scattered across multiple pages
  • No way to search across workspaces
  • Manual copy-pasting for external tools
  • Complex integration setup

Our Solution

  • Semantic search understands meaning
  • Unified search across all pages
  • Seamless workspace integration
  • Simple API for any tool
  • Setup in minutes

How It Works

1

Set Up Notion Integration

Create a Notion integration in your workspace and configure it in RAGaaS. We'll guide you through the simple OAuth setup.

2

Select Your Pages

Choose which Notion pages to connect. Our integration respects your permissions and only accesses the pages you explicitly select.

3

Start Searching

Use our API to search across your Notion content with AI understanding. Perfect for building internal tools, chatbots, or knowledge bases.

Implementation Guide

1. Create Notion Integration

First, create a public integration in Notion:

  1. Go to Notion Integrations
  2. Click New integration and fill in the basic information:
    • Add integration name as RAGaaS Integration (or your preferred name)
    • Select the workspace to install the integration
    • Choose the type of integration as Public
  3. Configure OAuth settings:
    • Add redirect URI: https://api.ragaas.dev/connectors/notion/callback and Save
  4. Choose the capabilities:
    • Only enable Read content in Content Capabilities (we don't need write access)
    • No need to select any Comment Capabilities
    • Select No user information in User Capabilities (we don't need to know which user is accessing the integration)
    • Save the configuration
  5. Note down your integration's credentials:
    • Client ID
    • Client Secret
    • Authorization URL

2. Configure RAGaaS

Add your Notion configuration to your RAGaaS namespace: (docs)

Configure Notion

curl -X PATCH https://api.ragaas.dev/v1/namespaces/ns_123 \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "notionConfig": {
      "clientId": "your-notion-client-id",
      "clientSecret": "your-notion-client-secret",
      "authorizationUrl": "your-notion-auth-url"
    }
  }'

3. Create Notion Connection

Now create a connection to your Notion workspace:

  1. First, create a new Notion connection (docs), you will get an authorizationUrl in the response
  2. Then, open the authorizationUrl in the browser for the user to authorize and select the pages to share with RAGaaS
  3. After authorization, Notion redirects back to RAGaaS
  4. Finally, check the status of this connection (docs)
  5. If the connection is successful, the status will be ACTIVE and if it's not, the status will be PENDING

Create Connection

# Create Notion connection
curl -X POST https://api.ragaas.dev/v1/connections/notion \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Notion Workspace",
    "namespaceId": "ns_123"
  }'

# Open authorizationUrl in browser for user to authorize
# User selects pages to share with RAGaaS
# Notion redirects back to RAGaaS after authorization

# Check connection status
curl "https://api.ragaas.dev/v1/connections/notion?namespaceId=ns_123" \
 -H "Authorization: Bearer ${RAGAAS_API_KEY}"

4. Ingest Notion Content

After successfully creating a connection, you can ingest the selected Notion pages: (docs)

Ingest Content

# Start ingestion
curl -X POST https://api.ragaas.dev/v1/ingest/notion \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "namespaceId": "ns_123",
    "ingestConfig": {
      "source": "NOTION",
      "config": {
        "connectionId": "your-connection-id",
        "metadata": {
          "source": "notion",
          "workspace": "My Workspace"
        }
      }
    }
  }'

# Get the ingestJobRunId from the response

# Check ingestion status
curl "https://api.ragaas.dev/v1/ingest-job-runs/job_xyz789?namespaceId=ns_123" \
 -H "Authorization: Bearer ${RAGAAS_API_KEY}"

5. Search Your Content

Once your ingestion job is complete, you can search across your Notion pages: (docs)

Search Content

curl -X POST https://api.ragaas.dev/v1/search \
  -H "Authorization: Bearer ${RAGAAS_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is our refund policy?",
    "namespaceId": "ns_123",
    "filter": {
      "metadata": {
        "source": "notion"
      }
    }
  }'

Best Practices

Security & Permissions

  1. Minimal Access

    • Our integration only requests read access
    • Users explicitly select which pages to share
    • No write permissions required
  2. Data Privacy

    • Content stored in your infrastructure
    • No data retention by RAGaaS
    • Your API keys, your control

Content Organization

  1. Page Selection

    • Start with a focused set of pages
    • Group related content together
    • Use consistent page structures
  2. Metadata

    • Add source and workspace metadata
    • Tag content by department/team
    • Enable filtered searching

Next Steps

  1. Start Small

    • Connect a few key pages
    • Test search functionality
    • Gather user feedback
  2. Optimize

    • Add more pages gradually
    • Fine-tune search filters
    • Set up regular sync
  3. Scale

    • Connect multiple workspaces
    • Build custom search interfaces
    • Integrate with internal tools