Notion Integration Setup
Create a Notion integration to access pages, databases, and blocks.
Setup Steps
Section titled “Setup Steps”-
Create a Notion Integration
Go to My Integrations and click “New integration”.
-
Configure Integration Settings
- Name: Fp Switchboard
- Associated workspace: Select your workspace
- Type: Select “Public” for OAuth integration
-
Set Capabilities
Enable the following capabilities:
- Read content
- Update content
- Insert content
- Read comments
- Create comments
- Read user information
-
Configure OAuth Settings
In the OAuth & redirect URIs section, add the redirect URI:
https://api.switchboard.fpdigital.ai/oauth/notion/callback -
Get OAuth Credentials
Copy the OAuth Client ID and OAuth Client Secret from the Secrets section.
-
Submit for Review (Optional)
For public distribution, submit your integration for Notion review. For internal use only, this is not required.
Environment Variables
Section titled “Environment Variables”npx wrangler secret put NOTION_CLIENT_IDnpx wrangler secret put NOTION_CLIENT_SECRET| Variable | Description |
|---|---|
NOTION_CLIENT_ID | OAuth Client ID from Notion Integration settings |
NOTION_CLIENT_SECRET | OAuth Client Secret from Notion Integration settings |
Redirect URI
Section titled “Redirect URI”https://api.switchboard.fpdigital.ai/oauth/notion/callbackImportant Notes
Section titled “Important Notes”- Nested blocks are limited to 2 levels via the API
- Notion tokens don’t expire unless the user revokes access
- Database queries support filtering and sorting
Common Issues
Section titled “Common Issues”- “object_not_found” error: The page or database hasn’t been shared with the integration. Share it first.
- Nested block limits: The API only returns 2 levels of nested blocks. Deeply nested content may be truncated.
- Rich text formatting: Notion uses block-based formatting. Complex layouts may not translate perfectly to text responses.
- Database property types: Some property types (rollup, formula) are read-only and cannot be set via the API.
Testing
Section titled “Testing”- Go to your Switchboard Dashboard and navigate to Notion
- Click Connect and authorize in your Notion workspace
- Share at least one page or database with the integration
- Click Test Connection to verify
- Try: “Search my Notion pages for meeting notes”