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

# Notion Integration

> Integrate with Notion to give Annie access to your team's pages, databases, and runbooks during incident investigations.

# Notion Integration

Connect Notion to give Annie visibility into your team's documentation, runbooks, and knowledge base. During an incident or chat session, Annie can search Notion for relevant procedures, retrieve page bodies, and (when permitted) update pages or post comments.

## Setup Guide

### 1. Create a Notion internal integration

1. Go to [Notion's My Integrations page](https://www.notion.so/my-integrations) and click **+ New integration**.
2. Give it a name (e.g. `Anyshift / Annie`) and associate it with the workspace you want Annie to access.
3. On the **Capabilities** tab, grant the capabilities you want Annie to use — at minimum **Read content**. Add **Update content**, **Insert content**, and **Read user information** if you want Annie to make changes or resolve user mentions.
4. Submit and copy the **Internal Integration Token** (starts with `ntn_...`).

### 2. Share the relevant pages and databases with the integration

Notion integrations are *opt-in per page*: Annie can only see pages that have been explicitly shared with your integration.

For each top-level page or database you want Annie to access:

1. Open the page in Notion.
2. Click **...** → **Connect to** → select your `Anyshift / Annie` integration.
3. The integration also gains access to child pages and databases automatically.

For broad access, share a single high-level workspace page (e.g. an `Engineering` or `Runbooks` parent) and Annie will be able to read everything beneath it.

### 3. Connect Notion to Anyshift

1. Go to the [Notion integration page](https://app.anyshift.io/integrations/knowledge/notion).
2. Click **New token**.
3. Fill in the form fields below and click **Save Notion token**.

#### Display name

A human-readable label for this token (e.g. `Engineering Workspace`). Used only to identify the credential in the Anyshift UI.

#### Integration token

Paste the **Internal Integration Token** you copied in step 1 (starts with `ntn_...`).

### Required Permissions

The integration needs these Notion capabilities for Annie to read and edit content:

* **Read content** — Required. Lets Annie search and read pages, databases, and blocks.
* **Update content** — Optional. Lets Annie edit blocks and update page properties.
* **Insert content** — Optional. Lets Annie create new pages, append blocks, or move pages.
* **Read user information** — Optional. Lets Annie resolve `@mentions` and assignees.
* **Read comments** / **Insert comments** — Optional. Lets Annie read and add comments.

Without **Update / Insert content**, Annie can still search and quote Notion pages — it just can't make changes.

## How It Works

Anyshift runs the official open-source [`@notionhq/notion-mcp-server`](https://github.com/makenotion/notion-mcp-server) on its agent gateway and authenticates against your Notion workspace using the integration token you provided.

Once connected, Annie's AI agent can:

* **Search your workspace** — Free-text search across all pages and databases the integration has access to (`post-search`).
* **Read pages and runbooks** — Retrieve page bodies, including nested blocks and child pages (`retrieve-a-page`, `get-block-children`).
* **Query databases** — Filter and sort rows in any database the integration can see (`query-data-source`, `retrieve-a-data-source`, `retrieve-a-database`).
* **Update content** — When permitted, edit blocks, update page properties, create pages, append children, move pages, and add comments.
* **Resolve users and mentions** — Look up workspace members to interpret `@mentions` and assignees.

### Security & scope

* Annie only sees pages explicitly shared with the integration — there is no workspace-wide access by default.
* The integration token is encrypted at rest (KMS) and is only decrypted in-process by Anyshift's gateway when Annie makes a Notion call.
* You can revoke access at any time by removing the integration from a page (or by deleting the integration entirely in Notion).

**Anyshift + Notion = Annie answers from your team's actual runbooks, not generic best-practices.**
