> For the complete documentation index, see [llms.txt](https://docs.scanner.dev/scanner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/data-ingestion/sources/notion.md).

# Notion

This guide walks through how to set up Notion audit logs in Scanner Collect, using Notion's Custom SIEM integration to send events directly to Scanner's HTTP receiver.

## Prerequisites

Before you begin, make sure you have:

* **A Notion Enterprise plan.** SIEM connections are only available on Enterprise.
* **Workspace owner permissions** in Notion. Only workspace owners can add a security & compliance connection.
* Permissions in Scanner to create the integration.

## Create a Collect Rule

{% stepper %}
{% step %}

### Create a New Source

In the Scanner UI, go to the Collect tab.

* From the Overview page click the '+' icon in the upper right corner
* Select create new **Collect Rule**
* Choose **Notion**
* Choose the Log Type **notion:audit**
  {% endstep %}

{% step %}

### Configure the Source

* Set a Display Name such as `my-org-notion-logs`.
* Leave the Payload Format as the default: **JSON: Generic**.
  {% endstep %}

{% step %}

### Configure Authentication

* Keep the default Authentication Type: **Bearer Token**.
* Generate a secure **Bearer token**. You can use a command like: `echo "token_$(uuidgen | tr '[:upper:]' '[:lower:]')"` and specify that here (we'll refer to it as `BEARER_TOKEN`)
  {% endstep %}

{% step %}

### Configure Destination

* Select the S3 bucket where you want raw logs delivered.
* (Optional) Enter a bucket prefix. The default is fine for most setups.
  {% endstep %}

{% step %}

### Review and Create

* Review your configuration.

After creation, Scanner will display a unique Endpoint URL like:

`https://collect.your-org-and-region.scanner.dev/receiver/v1/http/<id>`
{% endstep %}

{% step %}

### Configure in Notion

* Log in at `app.notion.com` as a workspace owner.
* Open the workspace switcher and click **Settings**.
* Go to the **Connections** tab and select **Custom SIEM integration**. You may need to use the search bar, or filter to **SIEM**, for this option to appear.
* Set the **Webhook URL** to the endpoint URL provided by Scanner.
* Add a new Webhook Header, and set the Key to `Authorization`, and the value to `Bearer ${BEARER_TOKEN}`.
  * Replace `${BEARER_TOKEN}` with the actual Bearer token you generated in the Configure Authentication step.
* Click **Connect** to finish.

Notion begins streaming audit log events to the endpoint immediately.
{% endstep %}
{% endstepper %}

Once routing is complete, logs will flow from Notion → Scanner HTTP Receiver → S3 → Scanner index.

## Create an Index Rule

Logs flow from Notion → Scanner's HTTP receiver → your S3 bucket. Create an Index Rule to have Scanner index those logs for fast search and detections.

{% content-ref url="/pages/Gem9jwD4aqayN3OiChpN" %}
[Create an Index Rule](/scanner/using-scanner-complete-feature-reference/data-ingestion/create-an-index-rule.md)
{% endcontent-ref %}

### Notion Defaults

When you create the Index Rule from the Collect Rule, the following defaults are pre-populated:

* **Transformations**: Add Metadata, Parse JSON Columns
* **Timestamp Field**: `event.timestamp`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/data-ingestion/sources/notion.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
