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

# Connect Notion to your assistant

> Read the Notion pages and databases you choose into MITHUNAI through an internal connection you create in Notion, from creating it to the first sync.

To connect Notion, create an internal connection in Notion, give it the pages you want read, and save its token in MITHUNAI. MITHUNAI reads exactly the pages and databases you shared with it, and nothing else.

> [!WARNING]
>
> Whatever you share with the connection, your assistant can quote to anyone who can ask it. Share
> only pages you are happy to publish that way. See [Saved connections](https://docs.mithunai.com/knowledge/connections.md).

> [!NOTE]
>
> Notion is in **beta**. It has been tested against scripted responses written from Notion's
> documentation, not yet against a real Notion workspace. Tell your MITHUNAI contact if a sync does
> not read what you expect.

## What you need

* To be a **Workspace Owner** in Notion. Only a Workspace Owner can create an internal connection.
* The **owner or admin** role in your MITHUNAI organisation.

## 1. Create the connection in Notion

1. Open the [Notion Developer portal](https://app.notion.com/developers/connections).
2. In the **Build** section of the sidebar, select **Internal connections**.
3. Click **Create a new connection**, name it (such as `MITHUNAI`), and choose your workspace.
4. Under its capabilities, keep **Read content** and turn off everything that inserts or updates content. MITHUNAI only reads.
5. Open the **Configuration** tab and copy the **API token**.

Notion calls this an *internal connection*. Older Notion pages call it an *integration*; it is the same thing. Do not use a *personal access token*: that reads everything you can see, not just what you choose.

## 2. Share pages with it

A new connection can read nothing until you share pages with it. Either:

* In the Developer portal, open the connection, choose the **Content access** tab, then **Edit access**, and pick the pages and databases; or
* In Notion, open a page, click **•••** in the top-right corner, choose **Connections**, then **+ Add connection**, and pick it.

Sharing a page also shares every page inside it. Sharing a database shares every row in it.

## 3. Save it in MITHUNAI

1. In the console, open **Sources** and choose **Connect source**.
2. Choose **Notion**.
3. You have no Notion connection yet, so the form to add one is open. Enter a **Connection name** of your own, such as `Docs team Notion`, and paste the **Token**.
4. Choose **Save connection**. The token is now stored encrypted and is never shown again.
5. Give the source a **Name**, and choose **Connect source**. The first sync starts straight away.

To add pages later, share them with the connection in Notion. They are read at the next sync.

## What is read

Every page shared with the connection, and every row of a shared database, as one document each: its title, a database row's properties (such as status, tags, dates and links) and its text, including headings, lists, quotes, code, tables and toggles. Answers cite the page with a link to it.

Not read: images, files, embeds, comments, and pages in the trash. Very long pages are cut at 2,000 blocks, and blocks nested more than four levels deep are left out. A page inside a page is read as its own document. A page that has not changed since the last sync is not read again.

## When something goes wrong

| What you see | Why, and what to do |
| - | - |
| *No pages have been shared with this Notion connection yet* | Share pages with the connection (step 2), then sync again. |
| *The Notion workspace did not accept the saved connection* | The token was reset or the connection was deleted in Notion. [Replace the token](https://docs.mithunai.com/knowledge/connections.md#replace-a-token). |
| *The Notion workspace is limiting how fast it can be read* | Notion is rate limiting. The sync is retried later by itself. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.