> For the complete documentation index, see [llms.txt](https://docs.erathos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.erathos.com/connectors/apis/notion.md).

# Notion

## Using the Erathos platform

When selecting Notion as a new connector on the Erathos platform, you will need to name your connection and fill in the following form:

* **Token** — your Notion internal integration token, used to authenticate all requests to the Notion API

With this connection created you can seamlessly move your Notion data to your BigQuery, Redshift or Postgres data warehouse.

### How to find my token?

To generate a Notion integration token, go to <https://www.notion.so/my-integrations> and click **New integration**. Give it a name, select the workspace you want to connect, and click **Submit**.

After creating the integration, copy the **Internal Integration Token** shown on the integration settings page. Then go to each Notion page or database you want to sync and add the integration under **Share → Invite**, granting it the appropriate access level.

Paste the token into the **Token** field on the Erathos platform and click **Save and close** to complete the setup.

## Endpoints and fields

### users

Sync type availability: Full-refresh

| Field       | Type |
| ----------- | ---- |
| id          | text |
| name        | text |
| type        | text |
| avatar\_url | text |

### pages

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `last_edited_time`

Parent of [`blocks`](https://claude.ai/cowork/local_ddda6c84-b8d2-46f0-964a-a36cc4a0c55f#blocks), [`comments`](#comments)

| Field              | Type      | Cursor |
| ------------------ | --------- | ------ |
| id                 | text      |        |
| created\_time      | timestamp |        |
| last\_edited\_time | timestamp | ✓      |
| archived           | boolean   |        |
| url                | text      |        |
| parent.type        | text      |        |

### blocks

Sync type availability: Full-refresh

Child of [`pages`](https://claude.ai/cowork/local_ddda6c84-b8d2-46f0-964a-a36cc4a0c55f#pages)

| Field              | Type      |
| ------------------ | --------- |
| id                 | text      |
| type               | text      |
| created\_time      | timestamp |
| last\_edited\_time | timestamp |
| has\_children      | boolean   |
| archived           | boolean   |

### comments

Sync type availability: Full-refresh

Child of [`pages`](https://claude.ai/cowork/local_ddda6c84-b8d2-46f0-964a-a36cc4a0c55f#pages)

| Field              | Type      |
| ------------------ | --------- |
| id                 | text      |
| discussion\_id     | text      |
| created\_time      | timestamp |
| last\_edited\_time | timestamp |
| created\_by.id     | text      |
| parent.type        | text      |

## Entity Relationships

```mermaid
erDiagram
    pages ||--o{ blocks : "id = page_id"
    pages ||--o{ comments : "id = page_id"
    users ||--o{ comments : "id = created_by.id"

    users { text id PK }
    pages { text id PK }
    blocks { text id PK }
    comments { text id PK }
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.erathos.com/connectors/apis/notion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
