Setup
- Go to Project Settings → Project Integrations
- Select Notion from the list
- Enter your credentials:
- Integration Secret - Your Notion internal integration secret
- Get it from Notion Integration Setup
- Integration Secret - Your Notion internal integration secret
- Test the connection
- Start using Notion in your prompts
How It Works
HelloLeo uses the Notion API through the Integration Proxy. Your integration secret is encrypted and stored securely on the backend. API calls are made directly from your frontend through the proxy, avoiding CORS issues.API Endpoints
The integration uses Notion’s REST API (version 2022-06-28). Common endpoints include:/v1/pages/{page_id}- Access individual pages/v1/databases/{database_id}/query- Query databases/v1/databases/{database_id}- Get database information/v1/blocks/{block_id}/children- Get block children
Common Operations
Read Pages
- GET
/v1/pages/{page_id}- Get page content and properties
Query Databases
- POST
/v1/databases/{database_id}/query- Query database records
Create Pages
- POST
/v1/pages- Create a new page
Update Pages
- PATCH
/v1/pages/{page_id}- Update page properties or content
Get Database Info
- GET
/v1/databases/{database_id}- Get database schema and properties
Example Usage
Display Pages
Display Page Content
Create a Page
Query Database
Best Practices
- Specify database or page - Always mention which Notion database or page you’re working with
- Use page titles - Reference pages by their titles when possible
- Mention the integration - Always say “from Notion” or “to Notion” so Leo knows which integration to use
- Grant access - Make sure your Notion integration has access to the pages and databases you want to use
Troubleshooting
Connection Issues
- Check integration secret - Verify your Notion integration secret is correct
- Integration access - Ensure your integration has been granted access to the pages/databases you need
- API version - The integration uses Notion API version 2022-06-28
Data Not Showing
- Check page/database ID - Verify you’re using the correct page or database ID
- Permissions - Ensure your integration has read access
- Page sharing - Make sure pages are shared with your integration
Can’t Create/Update
- Write permissions - Ensure your integration has write access
- Page parent - When creating pages, specify the correct parent page or database
- Property types - Check that property values match the expected types
