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:
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:
  • 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
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.

Databases and embedded views

nao sync exports Notion databases as markdown tables, both when a database is listed directly in notion.pages and when it is embedded inside a synced page. Previously an embedded database was replaced with a child_database is not supported note, leaving the file looking complete but missing the data - now the table content comes through. A database referenced by its plain URL is exported in full, without any view-specific filtering. To export a specific view instead, include its ?v=<view_id> in the URL - the export then applies that view’s filters, sorts, row order, and visible columns, so the agent sees the same slice you see in Notion.
Next Steps

Context Configuration

Initialize and configure your nao project

Synchronization

Learn how to sync and update your agent’s context