Notion
The Carbon Connect enabledIntegrations value for Notion is NOTION
.
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.
Carbon supports Notion databases and syncs the actual page content for each database record. We do not currently do not index the database properties.
Configuration
Custom OAuth Credentials
-
After you log into your Notion workspace, click here to navigate to the “My Integrations” page.
-
Click the ”+ New Integration” button to create your OAuth app.
- Select a workspace, enter the name for your app and upload an logo image. Click “Save” afterwards.
- Under the “Configuration” tab, navigate to the “Capabilities” section and select “Read Content” and “Read user information including email address”.
- Under the “Basic Information” tab, set the app type to “Public”, and save the settings.
- Once the app is enabled as a public integration, enter your organization information.
- 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
.
- 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"]
}