﻿---
title: Notion connector
description: Use the Notion connector to search pages and databases, retrieve content, and query databases in your Notion workspace.
url: https://docs-v3-preview.elastic.dev/elastic/kibana/pull/280898/reference/connectors-kibana/notion-action-type
products:
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview since 9.3
---

# Notion connector
The Notion connector communicates with the Notion API to explore content and databases in your Notion workspace.

## Create connectors in Kibana

You can create connectors in **Stack Management > Connectors**.

### Connector configuration

Notion connectors support **Bearer Token** (a static API token from an internal integration) or **OAuth 2.0 authorization code** (Notion signs the user in through Kibana and Kibana stores refreshable tokens). Select the authentication type when you create or edit the connector.
<definitions>
  <definition term="Bearer Token">
    A Notion internal integration token. See **Get API credentials**.
  </definition>
  <definition term="OAuth 2.0 authorization code">
    Uses a **public integration** in Notion. In Kibana you provide:
    - **Client ID** and **Client Secret**: from your Notion public integration
    - **Redirect URI**: register Kibana's OAuth callback in your Notion integration settings (see **Get API credentials**)
    The connector automatically uses the correct Notion OAuth endpoints and scopes.
  </definition>
</definitions>


## Test connectors

You can test connectors when you create or edit the connector in Kibana.
The Notion connector has the following actions:
<definitions>
  <definition term="Search Page or Data Source by Title">
    Search for pages or databases by title.
    - `Query` (required): The search query string.
    - `Query Object Type` (required): Type of object to search for (`page` or `data_source`).
    - `Start Cursor` (optional): Cursor for pagination.
    - `Page Size` (optional): Number of results per page.
  </definition>
  <definition term="Get Page">
    Retrieve a page by its ID.
    - `Page ID` (required): The unique identifier of the page.
  </definition>
  <definition term="Get Data Source">
    Retrieve a database by its ID. This action returns information about the database properties and columns, _not_ about its rows.
    - `Data Source ID` (required): The unique identifier of the database. Refer to [Notion's documentation](https://developers.notion.com/reference/retrieve-a-data-source#finding-a-data-source-id) for instructions on how to find this ID.
  </definition>
  <definition term="Query Data Source">
    Query a database with optional filters.
    - `Data Source ID` (required): The unique identifier of the database to query.
    - `Filter` (optional): JSON string representing the filter object.
    - `Start Cursor` (optional): Cursor for pagination.
    - `Page Size` (optional): Number of results per page.
  </definition>
</definitions>


## Connector networking configuration

Use the [Action configuration settings](/elastic/kibana/pull/280898/reference/configuration-reference/alerting-settings#action-settings) to customize connector networking, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.

## Get API credentials


### OAuth Authorization Code (recommended)

This matches the **OAuth 2.0 authorization code** authentication type in Kibana. You need to create a **public integration** in Notion.
1. Go to [My integrations](https://www.notion.so/my-integrations).
2. Select **+ New integration**.
3. Configure your integration:
   - Enter a name for your integration (for example, "Elastic" or "Kibana").
- Select the workspace where you want to use the integration.
- Select **Public** as the integration type.
- Fill in the required distribution fields (company name, website).
- Add a redirect URI. Copy the following pattern and substitute your public Kibana hostname:
  ```text
  https://<your-kibana-host>/api/actions/connector/_oauth_callback
  ```
4. Select **Submit** to create the integration.
5. In the integration settings, open the **Configuration** tab. Copy the **Client ID** and **Client Secret**.
6. In Kibana, create a Notion connector and select **OAuth 2.0 authorization code** as the authentication method. Enter the **Client ID** and **Client Secret**, then select **Authorize** to sign in with your Notion account.

<note>
  When a user authorizes the connector, Notion prompts them to select which pages and databases to share. Only the selected content is accessible to the connector.
</note>


### Internal integration (Bearer Token)

Use this method if you prefer a static API token. Tokens do not expire but only grant access to content explicitly shared with the integration.
1. Go to [My integrations](https://www.notion.so/my-integrations).
2. Select **+ New integration**.
3. Configure your integration:
   - Enter a name for your integration.
- Select the workspace where you want to use the integration.
- Configure the capabilities (content, comment, and user capabilities as needed).
4. Select **Submit** to create the integration.
5. Copy the **Internal Integration Token** (this is your bearer token).
6. Share the pages and databases you want to access with your integration by selecting **Share** on the page or database and inviting your integration.