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

# Notion

> Import knowledge content from Notion workspaces into AGO

Import pages and databases from Notion workspaces into AGO. The connector preserves hierarchical structure, converts Notion blocks to Markdown, downloads images, and supports database filtering and grouping.

| Feature            | Details                                |
| ------------------ | -------------------------------------- |
| **Authentication** | OAuth (recommended) or API Token       |
| **Content type**   | Wiki pages and databases               |
| **Hierarchy**      | Yes (page trees and database grouping) |
| **Attachments**    | Yes (images downloaded automatically)  |
| **Multi-language** | No                                     |

## Supported Content Types

### Pages

Import individual pages or entire page trees:

* Rich content (text, images, code blocks, lists)
* Parent-child relationships preserved
* Child page links optionally appended to parent content

### Databases

Import database items as individual knowledge documents:

* Two content modes: AGO detects whether content lives in item bodies or in database properties
* Filter by property values to import specific records
* Group items by a property to create a virtual folder hierarchy
* Optionally import subpages of each database item

## Prerequisites

1. A Notion workspace with content to import
2. A Notion integration (OAuth or API token) with access to the target pages or databases
3. The page ID or database ID to import

For step-by-step OAuth setup instructions, see [Connect Notion](../guides/connect-notion-howto).

## Setup Steps

1. Navigate to **Knowledge** > **Sources** > **Create**
2. Select **Notion** as the connector type
3. Authenticate via OAuth (recommended) or enter an API token
4. Enter the **Page ID** or **Database ID** to import
5. Choose whether you're importing a **Page** or a **Database**
6. Configure filtering and grouping options (see below)
7. Save and run a manual sync

## Configuration Options

### Page Sources

| Setting            | Required | Default | Description                                              |
| ------------------ | -------- | ------- | -------------------------------------------------------- |
| Source type        | Yes      | —       | Set to "Page"                                            |
| Append child links | No       | Off     | Add links to child pages at the bottom of parent content |

### Database Sources

| Setting              | Required | Default | Description                                                        |
| -------------------- | -------- | ------- | ------------------------------------------------------------------ |
| Source type          | Yes      | —       | Set to "Database"                                                  |
| Filter               | No       | None    | Notion API filter to import specific records                       |
| Import subpages      | No       | Off     | Also import subpages of each database item                         |
| Group by property    | No       | None    | Group items under virtual parent documents by a property value     |
| Add navigation links | No       | Off     | Add navigation links between grouped documents (requires grouping) |

### Database Filtering

Use Notion's filter syntax to import specific records. For example, to import only published items:

```json theme={null}
{
  "property": "Status",
  "select": {
    "equals": "Published"
  }
}
```

You can combine multiple filters with `and`/`or` operators.

### Database Grouping

Group database items by a property to create a folder-like structure in AGO:

| Setting               | Required | Default            | Description                                                      |
| --------------------- | -------- | ------------------ | ---------------------------------------------------------------- |
| Property name         | Yes      | —                  | The Notion property to group by                                  |
| Parent title template | No       | `{property_value}` | Template for group names (use `{property_value}` as placeholder) |
| Fallback parent name  | No       | `Ungrouped Items`  | Name for items without the grouping property                     |

**Example:** Grouping a product database by "Category" creates parent documents like "Electronics Section", "Books Section", with individual items nested underneath.

## What Gets Imported

### Content Conversion

Notion blocks are converted to Markdown:

* Text blocks become paragraphs
* Heading blocks become Markdown headers (`#`, `##`, `###`)
* Images are downloaded and stored as attachments
* Lists, code blocks, and tables are preserved

### Database Properties

Properties from database items are formatted as a Markdown section at the top of each document (e.g., Status, Category, Tags, dates).

### Document Types

AGO creates different document types based on your Notion content:

| Type                | Description                                             |
| ------------------- | ------------------------------------------------------- |
| Pages               | Regular Notion pages with their full content            |
| Database containers | Represent the database itself, with links to items      |
| Database items      | Individual records from a Notion database               |
| Group containers    | Virtual folders created when using the grouping feature |

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication failed">
    * Verify the Notion integration has access to the target pages or database
    * For OAuth, try re-authorizing the connection
    * For API tokens, check the token hasn't expired
  </Accordion>

  <Accordion title="Missing content">
    * Confirm the Notion integration is shared with the target pages (in Notion, click "..." > "Connections" on the page)
    * Check filter configuration for databases — it may be excluding records
    * Verify the page or database ID is correct
  </Accordion>

  <Accordion title="Missing images">
    * Images are downloaded during sync — check the sync logs for download errors
    * If images fail to download, the original Notion URLs are preserved as a fallback
  </Accordion>

  <Accordion title="Import seems incomplete">
    * Large databases are paginated automatically, but check the sync history for errors
    * Verify the integration has access to all child pages (Notion requires explicit sharing for each page)

    ***
  </Accordion>
</AccordionGroup>

## Related

* [Connect Notion](../guides/connect-notion-howto) — Step-by-step OAuth setup guide
* [Knowledge Connectors](./knowledge-connectors) — All available connectors
* [Knowledge Source Management](../features/knowledge-source-management) — Managing sources
