Add Notion as a context provider to give your agent access to documentation, wikis, and knowledge bases stored in Notion.
Why Add Notion?
Syncing Notion pages allows your agent to:
- Answer questions using your teamβs documentation
- Reference business definitions and glossaries
- Use onboarding docs, runbooks, and process guides as context
Adding Notion
During initialization
When you run nao init, you can add Notion interactively:
The wizard will prompt for your Notion API key and the page IDs you want to sync.
Manual configuration
Add Notion to your nao_config.yaml:
notion:
api_key: {{ env('NOTION_API_KEY') }}
pages:
- 0123456789abcdef0123456789abcdef
- fedcba9876543210fedcba9876543210
api_key β Your Notion integration API key. Use {{ env('NOTION_API_KEY') }} to reference an environment variable.
pages β List of Notion page IDs to sync. You can find a page ID in the page URL: https://notion.so/workspace/Page-ID-here.
Never commit your Notion API key to Git. Use environment variables for secrets.
What Happens at nao sync
When you run nao sync, nao:
- Connects to Notion using your API key
- Fetches each configured page and its content
- Exports pages as markdown files
- Writes them under
docs/notion/ in your nao project
your-project/
βββ docs/
βββ notion/
βββ page-1.md
βββ page-2.md
βββ ...
The exported markdown becomes part of your agentβs context. Users can ask questions like βWhat does our onboarding doc say about X?β and the agent will read from the synced Notion content.
Next Steps