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

# Notion Connector

> Connect Notion to TextQL to query pages, databases, and notes across your workspace.

### **1. Overview**

Connect your Notion workspace to Ana to search and analyze pages, databases, and notes across your team's knowledge base. Ana can query structured database entries, read page content, and surface information from across your workspace.

<Note>
  Create an integration in Notion, share the relevant pages and databases with it, and store the token as an API Connector in TextQL.
</Note>

### **2. Prerequisites**

You'll need:

* A Notion account with access to the pages or databases you want Ana to query
* Admin access to your Notion workspace if you are setting up an Org-level integration
* A TextQL account with permission to add API connectors

### Which connection type should I use?

|                    | Personal access token               | Org-level integration                      | Per-member integration                           |
| ------------------ | ----------------------------------- | ------------------------------------------ | ------------------------------------------------ |
| **Best for**       | Personal scripts and individual use | Team automations within a single workspace | Apps serving multiple workspaces or Notion users |
| **Scope**          | One user in one workspace           | One workspace                              | Any workspace                                    |
| **Authentication** | Static bearer token                 | Static API token                           | OAuth 2.0                                        |

<Note>
  If you're setting this up for your team, use an **Org-level integration**. A personal access token limits Ana to your individual permissions only, which may cause incomplete results for shared workflows. Per-member integrations are only necessary when connecting multiple Notion workspaces.
</Note>

### **3. Capabilities**

Once configured, Ana can:

* Fetch and search pages, databases, and documents across your Notion workspace
* Query structured database entries and filter by properties, tags, dates, or status
* Summarize content from pages, meeting notes, and project docs
* Surface linked pages and related content across your workspace
* Generate reports from database views, such as project trackers, CRMs, or task lists
* Answer questions grounded in your Notion content, like *"What's the status of X project?"* or *"Who owns Y task?"*

The integration uses read-only access by default — Ana can query and summarize your Notion content but cannot create, edit, or delete pages.

### **4. Setup Instructions**

***

### Step 1: Generate Your Notion Credentials

Before configuring TextQL, you'll need credentials from Notion. Which type you generate depends on your use case — see [Which connection type should I use?](#which-connection-type-should-i-use) above for guidance.

<Frame caption="The Notion Developer Portal Connections page, showing Org-level, Per-member, and Personal Access connections side by side">
  <img src="https://mintcdn.com/textql/PuiCWMieQ0hCUWtY/images/datasources/notion/notion-connection-types.png?fit=max&auto=format&n=PuiCWMieQ0hCUWtY&q=85&s=7e7c71ff86f0f9401f9f098aa98de38a" alt="Notion Developer Portal listing Org-level, Per-member, and Personal Access connections" width="1950" height="727" data-path="images/datasources/notion/notion-connection-types.png" />
</Frame>

#### Personal access token

1. Go to [notion.com/developers](https://notion.com/developers) and sign in.
2. In the left sidebar, click **Personal access tokens**.
3. Click **New token**.
4. Enter a name and choose the workspace you want to connect.
5. Click **Create token**, then copy the value immediately.

<Warning>
  Personal access tokens expire **one year after creation**. Store the expiry date somewhere you'll remember so you can rotate it before it lapses.
</Warning>

#### Org-level & Per-member integration

1. Go to [notion.com/developers](https://notion.com/developers) and sign in.
2. Navigate to **Connections** on the left sidebar and click **New connection**.
3. Enter a name and choose **OAuth** for the authentication method.
4. Choose the development workspace and where the workspace will be installed.
5. Under **Installable in**, configure based on your connection type:
   * **Org-level**: uncheck **Any workspace** and select only your specific workspace
   * **Per-member**: ensure **Any workspace** is selected
6. For **Redirect URL**, enter `https://app.textql.com/auth/api-oauth/callback`.
7. Click **Save**.
8. Open the **Configuration** tab and copy your **OAuth client ID** and **OAuth client secret**.

<Warning>
  You must be a **Workspace Owner** to create an Org-level integration. If you don't have this role, ask your Notion admin to set it up and share the credentials with you securely.
</Warning>

***

### Step 2: Add Notion as an API Connector in TextQL

<Frame caption="Notion highlighted in the TextQL API Connectors setup panel — select it to open the connector configuration form">
  <img src="https://mintcdn.com/textql/PuiCWMieQ0hCUWtY/images/datasources/notion/notion-api-connector.png?fit=max&auto=format&n=PuiCWMieQ0hCUWtY&q=85&s=aa4a3a7cfa395128e6603f543938a6e7" alt="TextQL Add More API Connectors panel with Notion highlighted" width="1950" height="836" data-path="images/datasources/notion/notion-api-connector.png" />
</Frame>

1. Go to [app.textql.com](https://app.textql.com) and sign in.
2. In the bottom-left sidebar, click **Connectors**.
3. Select the **APIs** tab, then click **Notion**.
4. In the configuration panel, choose your **Authentication Type** and fill in the matching fields.

#### Personal access token (PAT)

<Frame caption="Select API Token as the authentication type when using a Notion personal access token">
  <img src="https://mintcdn.com/textql/PuiCWMieQ0hCUWtY/images/datasources/notion/notion-auth-api-token.png?fit=max&auto=format&n=PuiCWMieQ0hCUWtY&q=85&s=5ab8e4e2b93b5a1fb2bb7795f5c9b03c" alt="TextQL Notion connector form with the API Token authentication type selected" width="1950" height="688" data-path="images/datasources/notion/notion-auth-api-token.png" />
</Frame>

* **Name**: a label for this connection (e.g. `Notion PAT`)
* **Authentication type**: select **API Token**
* **Integration token**: paste the access token from Step 1

#### Org-level integration

<Frame caption="Select OAuth (Org-level) when connecting a single workspace for your whole team">
  <img src="https://mintcdn.com/textql/PuiCWMieQ0hCUWtY/images/datasources/notion/notion-auth-oauth-org.png?fit=max&auto=format&n=PuiCWMieQ0hCUWtY&q=85&s=b670c2e294c5edd9bb924c0bae36eeaf" alt="TextQL Notion connector form with the OAuth (Org-level) authentication type selected" width="1950" height="746" data-path="images/datasources/notion/notion-auth-oauth-org.png" />
</Frame>

* **Name**: a label for this connection (e.g. `Notion Org-level`)
* **Authentication type**: select **OAuth (Org-level)**
* **Client ID** and **Client Secret**: paste the values copied in Step 1
* **OAuth Authentication**: click **Authenticate** and select which docs you want Ana to see

#### Per-member integration

<Frame caption="Select OAuth (Per-member) when connecting multiple workspaces or Notion users">
  <img src="https://mintcdn.com/textql/PuiCWMieQ0hCUWtY/images/datasources/notion/notion-auth-oauth-per-member.png?fit=max&auto=format&n=PuiCWMieQ0hCUWtY&q=85&s=0849c8a6e25af9296d55f737b67dcc04" alt="TextQL Notion connector form with the OAuth (Per-member) authentication type selected" width="1950" height="703" data-path="images/datasources/notion/notion-auth-oauth-per-member.png" />
</Frame>

* **Name**: a label for this connection (e.g. `Notion Per-member`)
* **Authentication type**: select **OAuth (Per-member)**
* **Client ID** and **Client Secret**: paste the values copied in Step 1
* **OAuth Authentication**: click **Authenticate** and select which docs you want Ana to see

Click **Save** to finish.

***

### Step 3: Verify the Connection

Once saved, confirm the connector is active:

1. Click on the Notion connector and select Test Connection at the bottom of the panel.

* A successful setup will return Connection successful (200).
* If the test fails, refer to the [Troubleshooting](#6-troubleshooting) section for next steps.

<Tip>
  If Ana returns **no results** rather than an error, your integration may not have access to any pages yet. In Notion, make sure the relevant pages have been shared with your connection under **Share > Connections**.
</Tip>

***

### **5. Usage Examples**

Once your Notion connector is live, try asking Ana:

* *"What tasks are currently marked as in progress in my project tracker?"*
* *"Find all pages related to \[project name]."*
* *"What decisions were made in Q1 planning docs?"*
* *"Pull everything in my Notion CRM where the status is 'Active'."*
* *"Which pages haven't been updated in the last 30 days?"*

***

### **6. Troubleshooting**

| Symptom                                      | Likely Cause                          | Fix                                                                                                                                  |
| -------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `OAuth Authentication: Something went wrong` | Incorrect redirect URL                | In your Notion integration settings, make sure `https://app.textql.com/auth/api-oauth/callback` is listed exactly as a redirect URL. |
| Ana returns no results (no error)            | Pages not shared with the integration | In Notion, share the relevant pages and databases with your connection under **Share > Connections**.                                |

### **7. Security Notes**

* **Personal access tokens** expire one year after creation. Regenerate and update your TextQL connector before the token lapses to avoid interruptions.
* **OAuth credentials** (Org-level and Per-member integrations) do not expire but should be rotated periodically as a best practice.
* Do not share API keys, client secrets, or OAuth credentials in email, chat, tickets, or other unsecured locations.
* The integration uses **read-only** access by default — Ana can query and summarize your Notion content but cannot create, edit, or delete pages.
* To revoke access, go to your Notion Developer Portal, find your connection, and delete it. Then remove the connector from **Connectors > APIs** in TextQL.

For more details on how Notion handles API authentication and permissions, refer to [Notion's official API documentation](https://developers.notion.com).

***

### Need Help?

For further assistance, please contact [support@textql.com](mailto:support@textql.com).

### **Privacy Policy**

For information about how we handle your data and protect your privacy, please review our [Privacy Policy](https://textql.com/privacy).
