> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Notion knowledge sync

> Sync Notion pages and databases into Ravenna knowledge folders with preserved hierarchy and auto-detection of new pages and edits.

Sync Notion pages and databases to power agent responses. Import workspaces with preserved hierarchy, automatic sub-page inclusion, and intelligent sync that captures new pages and updates.

## What you can do

* Browse your Notion workspace as a collapsible tree in the picker
* Select a parent page or database to import it and every descendant beneath it
* Deselect individual sub-pages to exclude them without losing the parent selection
* Preserve original page structure and organization
* Auto-sync new pages, edits, and hierarchy changes

## Setup

<Steps>
  <Step title="Select Notion as your source">
    When adding documents to a knowledge folder, select **Notion** from the available sources.
  </Step>

  <Step title="Authenticate with Notion">
    Complete the OAuth flow to grant Ravenna access to your Notion workspace.
  </Step>

  <Step title="Select pages">
    Choose which pages and databases to import using the document picker. The picker displays your Notion workspace as a collapsible tree, up to three levels deep from each top-level source.

    The first time you open the picker after connecting (or re-authenticating) Notion, Ravenna fetches your pages in the background. For large workspaces this can take a few minutes. You can safely close the dialog and reopen it later — your pages will be ready to select.
  </Step>
</Steps>

<Callout icon="link" color="#6B7280">Learn more about [managing knowledge folders](/documentation/automate/knowledge/overview)</Callout>

## How it works

<AccordionGroup>
  <Accordion title="Tree picker" icon="folder-tree">
    The document picker renders your Notion workspace as a tree so you can pick content at the right level of granularity:

    * Each Notion workspace you granted access to appears as its own section.
    * Every subtree starts collapsed. Click the chevron next to a page to expand it and see its children.
    * The tree shows up to three levels from each top-level source. Content deeper than that is still synced when you select an ancestor — it just isn't listed as its own selectable row.
    * Type in the search box to switch to a flat, filtered list. Clear the search to return to the tree.

    <Tip>Use **Select all** / **Unselect all** in a workspace header to toggle every top-level source in that workspace at once.</Tip>
  </Accordion>

  <Accordion title="Parent and child selection" icon="square-check">
    Selecting a parent implicitly imports every descendant beneath it, so you don't need to check each child individually:

    * Checking a parent marks every descendant as covered — their checkboxes show as checked automatically.
    * If a parent isn't selected but one of its descendants is, the parent's checkbox shows an indeterminate state so you can see the selection is nested.
    * You can still uncheck an individual descendant under a selected parent. The row stays visible with a strikethrough to show it will be excluded from sync, and the parent keeps its selection. Re-check the row to include it again.

    <Note>Only pages and databases you explicitly selected (or explicitly deselected under a selected parent) are stored as knowledge sources. Everything else is derived from those roots at sync time, so moves and renames in Notion follow automatically.</Note>
  </Accordion>

  <Accordion title="Hierarchy preservation" icon="sitemap">
    Original page structure from your Notion workspace is maintained:

    * Parent-child relationships between pages are preserved.
    * Page organization mirrors your Notion workspace.
    * Nested pages are automatically imported when their parent is selected.
    * Updates to page hierarchy in Notion sync during auto-sync.
  </Accordion>

  <Accordion title="Content formatting" icon="table">
    Notion content is converted to markdown during sync to maximize agent comprehension:

    * Tables are preserved as GitHub-Flavored Markdown tables, including header rows and cell formatting.
    * Headings, lists, code blocks, and inline formatting carry over from the source page.
    * Empty tables and tables with no header row are handled automatically.

    No configuration is required. Content fidelity improvements apply to all new and re-synced pages.
  </Accordion>
</AccordionGroup>

## Managing imported content

Reopen the picker on a Notion knowledge source at any time to change your selection. Ravenna compares your new selection against what's already imported and reconciles the difference in a single save:

* **Newly selected** parents are ingested, including their descendants.
* **Newly deselected** parents (or descendants excluded under a still-selected parent) are archived so agents stop using them, without losing sync history.
* **Re-included** descendants that were previously excluded are re-ingested.

You can also archive individual pages after import to exclude them from agent responses while keeping them in the knowledge folder for reference.

<Callout icon="link" color="#6B7280">Learn more about [managing documents](/documentation/automate/knowledge/overview#managing-documents)</Callout>

## Auto-sync

When auto-sync is enabled, Notion content stays up-to-date:

* New pages added beneath a selected parent are automatically imported.
* Descendants you excluded under a selected parent stay excluded, even if new sub-pages are added around them.
* Page edits and updates sync to your knowledge base.
* Deleted pages are removed from your knowledge base.
* Page reorganization is reflected in the hierarchy.

## Troubleshooting

<Accordion title="Linked database error during sync">
  You may see an error stating that a page contains a **linked database** whose source database is not shared with the Ravenna integration. This means the page includes a database view that references a source database located elsewhere in your Notion workspace.

  Linked databases are shortcuts or filtered views of a source database. When the source database isn't shared with the Ravenna connection, the linked database's content cannot be indexed.

  To fix this:

  1. Open your Notion workspace and locate the source database that the linked database references.
  2. Click the **...** menu on the source database page.
  3. Select **Connections**, then share the page with the Ravenna integration.
  4. Re-sync your knowledge folder in Ravenna.
</Accordion>
