Skip to main content
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:
nao init
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:
  1. Connects to Notion using your API key
  2. Fetches each configured page and its content
  3. Exports pages as markdown files
  4. 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

Context Configuration

Initialize and configure your nao project

Synchronization

Learn how to sync and update your agent’s context