# Notion

The **Notion** data source in Epsilla enables users to connect to their Notion workspace, allowing them to load Notion databases (DB) or pages into the knowledge base. This is particularly useful for pulling structured content like notes, tasks, and project documentation directly from Notion.

### **Select Knowledge Base Type**

Select **Notion** as the data source type. Click **Continue** to proceed.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-54553ae4d21e42ab1aea3f8eb8516b4ebfd7404b%2Fchoose%20notion%20data%20source.png?alt=media" alt="" width="330"><figcaption></figcaption></figure>

### **Knowledge Base Name**

Provide a **Knowledge Base Name** that will help identify the data source. The name should begin with a letter or an underscore (`_`) and can contain only letters, digits, underscores, and whitespaces. For example, enter `MyNotionDocs`.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-2fba0bccd5b12dc8e2e307d7b0602e150f314c28%2Fnotion%20kb%20name.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### **Notion Authentication**

**Token**: Provide your Notion Integration Token to allow Epsilla to access your Notion workspace. You can generate the token by setting up a Notion integration and using the token provided in Notion’s API settings. [Instructions and examples](#notion-integration-instructions) are at the end.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-55a05ea06db255e7a45bbfe119296957988c3ccb%2Fnotion%20token.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

After entering the token, you can choose to import either **Database** or **Pages**.

### **Load from Notion Databases**

To import a database, select **Database**. Enter the **Database ID** from Notion that you wish to connect. You can find the Database ID in the URL of your Notion page.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-8eaffea65dd7e4c7aee89b1c61987227649fca3e%2Fnotiont%20add%20db%20id.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### **Load from Notion Pages**

To import individual pages, select **Pages**. Enter the **Page IDs** of the Notion pages you wish to load.

You can add a **Single Page ID.**

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-43d0d8c00f1e7be24f2b6a911a14adc4309e9db2%2Fnotion%20add%20single%20page%20id.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Or you can choose to add **Multiple Page IDs** at once by separating them with new lines.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-d36d945cdc3fdaefce7f93f75d64acf32b350e57%2Fnotion%20add%20multi%20page%20ids.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### **Data Processing**

Once you have entered the necessary information (Token and Database/Page IDs), click **Create** to initiate the knowledge base creation. Epsilla will automatically process the content, importing it into the knowledge base.&#x20;

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-b7ac7a66ad89a9b41579b3293204c02b4bb83555%2Fnotion%20creation%20progress.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

After the data is processed, you can view the list of loaded Notion documents (either database entries or pages) in the **Loaded Files** section. Files that are ready for use will be marked as **Ready**, while those still processing will show a status of **Processing data**.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-41c05eb00eeea32b2188b791babceeabfbeaed6b%2Fnotion%20process.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

You can add additional pages or databases later by navigating to the **Data Sources** tab of your knowledge base.

### Notion Integration Instructions

This guide provides step-by-step instructions on creating an internal-use Notion integration, retrieving the integration token, and connecting it to your Notion pages or databases. This integration is for internal use only and will allow you to securely automate and interact with your Notion workspace.

**Create a New Integration in Notion**

* **Navigate to Integrations**:

  Go to `https://notion.so/profile/integrations`. You will see a section called **Integrations**.
* **Create a New Integration**:

  Click on the **New integration** button under "Integrations." Fill in any required details for your integration, such as integration name.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-486cc1db3880a0b4fde62b6ac307a3eec7a38e65%2FScreenshot%202024-10-15%20at%2012.15.57%E2%80%AFAM.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Retrieve the Internal Integration Secret (Token)**

* **Locate your Integration Token**:

  Once you’ve created the integration, you will be provided with an **Internal Integration Secret**. The token is essential for authenticating your API requests to Notion.
* **Copy the Secret**:

  Copy this token by clicking on **Show** (as seen in the screenshot) and saving it securely.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-a22a1bbf5af74a9b7cc5f813ddaa9d5de19771ab%2FScreenshot%202024-10-15%20at%2012.44.31%E2%80%AFAM.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Connect Your Integration to a Notion Database/Page**

* **Find the Database/Page You Want to Connect**:

  Open the desired database or page in Notion that you want the integration to interact with. In the page's menu (right-hand side), select **Connections** and click **Connect to**.
* **Select Your Integration**:

  From the list of available integrations, choose the one you just created (e.g., "my-notion-test"). This will establish a connection between your Notion page or database and your newly created integration.

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-d76a8b156c886c528a58767eb8cdf7d6fadc84a9%2FScreenshot%202024-10-15%20at%2012.16.37%E2%80%AFAM.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://2532879721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0ZX7fId7ifK45ldHWEp%2Fuploads%2Fgit-blob-c5b0d7fe523d4a384e2e68f3b56d867e0bbcc5f9%2FScreenshot%202024-10-15%20at%2012.16.49%E2%80%AFAM.png?alt=media" alt="" width="273"><figcaption></figcaption></figure>

**Find the Notion Page ID**

When you're on the desired Notion page, check the URL in your browser. The page ID is the string of characters after the last dash (`-`) in the URL. For example, in the screenshot: `doc1-1185a837ddfb4b74bfff9fc7b5`, the page ID is `1185a837ddfb4b74bfff9fc7b5`.
