SurfSense/surfsense_web/content/docs/connectors/notion.mdx

106 lines
3.4 KiB
Text

---
title: Notion
description: Connect your Notion workspaces to SurfSense
---
# Notion OAuth Integration Setup Guide
This guide walks you through setting up a Notion OAuth integration for SurfSense.
## Step 1: Access Notion Integrations
1. Navigate to [notion.so/profile/integrations](https://notion.so/profile/integrations)
2. Click the **"New integration"** button
![Notion Integrations Page](/docs/connectors/notion/notion-integrations-page.png)
## Step 2: Configure New Integration
Fill in the integration details:
| Field | Value |
|-------|-------|
| **Integration Name** | `SurfSense` |
| **Associated workspace** | Select your workspace |
| **Type** | `Public` |
| **Company name** | Your company name |
| **Website** | Your website URL |
| **Tagline** | Brief description |
| **Privacy Policy URL** | Your privacy policy URL |
| **Terms of Use URL** | Your terms of use URL |
| **Email** | Your developer email |
| **Logo** | Upload a 512x512 logo |
### OAuth Redirect URI
Under **OAuth domains & URIs**, set the **Redirect URI** to:
```
http://localhost:8000/api/v1/auth/notion/connector/callback
```
Click **Save** to create the integration.
![New Integration Form](/docs/connectors/notion/notion-new-integration-form.png)
## Step 3: Get OAuth Credentials & Configure Capabilities
After creating the integration, you'll see the configuration page with your credentials:
1. Copy your **OAuth Client ID**
2. Copy your **OAuth Client Secret** (click Refresh if needed)
### Set Required Capabilities
Enable the following capabilities:
| Capability Type | Required Setting |
|----------------|------------------|
| **Content Capabilities** | Read content |
| **Comment Capabilities** | Read comments |
| **User Capabilities** | Read user information including email addresses |
Click **Save** to apply the capabilities.
![Integration Configuration](/docs/connectors/notion/notion-integration-config.png)
---
## Limitations & Unsupported Content
Notion's API has limitations on certain block types that cannot be retrieved. SurfSense will automatically skip these unsupported blocks and continue syncing all other content.
### Unsupported Block Types
The following Notion features are **not accessible via the Notion API** and will be skipped during sync:
- **Transcription blocks** - Audio/video transcriptions from Notion AI
- **AI blocks** - AI-generated content blocks
### Learn More
The Notion API only supports specific block types for retrieval. The official list of **supported block types** is documented in Notion's Block reference:
- **[Block Object Reference](https://developers.notion.com/reference/block)** - Official documentation listing all supported block types. Any block type not listed here (such as `transcription` and `ai_block`) is not accessible via the Notion API.
For additional information:
- [Working with Page Content](https://developers.notion.com/docs/working-with-page-content) - Guide on how the Notion API handles page content
- [Notion API Reference](https://developers.notion.com/reference) - Complete API documentation
---
## Running SurfSense with Notion Connector
Add the Notion credentials to your `.env` file (created during [Docker installation](/docs/docker-installation)):
```bash
NOTION_OAUTH_CLIENT_ID=your_notion_client_id
NOTION_OAUTH_CLIENT_SECRET=your_notion_client_secret
NOTION_REDIRECT_URI=http://localhost:8000/api/v1/auth/notion/connector/callback
```
Then restart the services:
```bash
docker compose up -d
```