# Notion

![notion_logo.svg](https://assets.relyanceuat.xyz/images/docs/6263325344653/6366780355341.svg)
Notion is a project management and note-taking software. It help members of a company or organization take notes, add tasks, manage projects, manage files, save documents, set reminders, keep agendas, and organize their work.

In order to integrate Notion with Relyance AI you will need a **Notion Bearer API Token**.

#### In Notion:

1. Login to your Notion account.
2. Go to the integrations page: [https://www.notion.so/my-integrations](https://www.notion.so/my-integrations)
3. Click on **New Integration**.
4. This page will ask you enter some information for the integration. Use these settings: i. **Name**: Relyance ii. **Logo**: Use the attached [Relyance Logo](https://support.relyance.ai/hc/en-us/article_attachments/6367649969805/Relyance_logo.png) iii. **Capabilities**: Read Content iv. **User Capabilities**: Read user information including email addresses
5. Click **Submit**.
6. Once created, you'll be provided with Internal Integration Token.
7. Copy this **Token** to be used in Relyance AI.
8. Relyance only scans *database schemas* in Notion pages for PII, and each database must be shared to the newly created Relyance app. To do so, click on the menu with the three dots in the top right-hand corner, go to **Add Connection**, and in the side menu select your app.  If you add the app to a top-level page, all child pages will also be added. It is suggested to add this integration to each top-level page.

![Notion-1.png](https://assets.relyanceuat.xyz/images/docs/6263325344653/6367116328845.png)

![Notion-2.png](https://assets.relyanceuat.xyz/images/docs/6263325344653/6367240790029.png)

![Notion-6.png](https://assets.relyanceuat.xyz/images/docs/6263325344653/14025889918733.png)

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Notion** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **Notion Bearer API Token** into the respective field.

![Notion-3.png](https://assets.relyanceuat.xyz/images/docs/6263325344653/6367310194701.png)

9. Click **Authenticate**.
10. At this point, you should see the following result on the Vendor Integrations page:

![Notion-4.png](https://assets.relyanceuat.xyz/images/docs/6263325344653/6367336785037.png)

11. Congratulations, you are now connected to **Notion**.

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

```hcl
resource "relyance_integration_connection" "notionnotes" {
  vendor = "notionnotes"
  name   = "<your connection name>"

  auth = {
    method = "api-key"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      API_KEY = var.notionnotes_api_key
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
