Authorization Type

Carbon uses OAuth 2.0 to connect to Notion workspaces.

Authorization Flow

Functionality

Carbon enables end-users to select top-level pages for synchronization and automatically syncs all sub-pages. For instance, a top-level Company page may contain sub-pages for Company Benefits and PTO Policy. Once the end-user selects the Company page in the Authorization flow, Carbon automatically includes the sub-pages Company Benefits or PTO Policy to be synced.

Configuration

Custom OAuth Credentials

  1. After you log into your Notion workspace, click here to navigate to the “My Integrations” page.

  2. Click the ”+ New Integration” button to create your OAuth app.

  3. Enter the name for your app and upload an logo image. Click “Submit” afterwards.

  1. Navigate to the “Capabilities” tab and select “Read Content” and “Read user information including email address”.

  1. Navigate to the “Distribution” tab and enable the app as a public integration.

  1. Once the app is enabled as a public integration, enter your organization information.

  1. Add https://api.carbon.ai/integrations/notion as the “Redirect URIs”. You can also use a custom CNAME record pointing to https://api.carbon.ai but the domain path must still be /integrations/notion.

  1. Share the “OAuth client ID”, “OAuth client secret” and “Authorization URL” with us under the “Secrets” tab.

Synchronization

Syncs are triggered when end-users add or remove pages via the Notion OAuth flow. You can use the resync_file API endpoint to programmatically resync specific Notion files.

When a user adds a nested page or database record under a selected Notion page, we auto-sync those documents as well.

To sync Notion pages on a 24-hour schedule (more frequent schedules available upon request), you can use the /update_users endpoint. This endpoint allows organizations to customize syncing settings according to their requirements, with the option to enable syncing for all data sources using the string ‘ALL’. It’s important to note that each request supports up to 100 customer IDs.

Here’s an example illustrating how to automatically enable syncing for updated Notion content for specified users:

{
    "customer_ids": ["team@carbon.ai", "sam@openai.com"],
    "auto_sync_enabled_sources": ["NOTION"]
}