> For the complete documentation index, see [llms.txt](https://doc.nextbot.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.nextbot.ru/functional/integrations/notion/connection.md).

# Подключение

Инструкции по интеграции с Notion

1. Перейдите в свой аккаунт Notion.
2. Откройте страницу интеграций по [ссылке](https://www.notion.so/profile/integrations/internal).
3. Нажмите на «+» Create a new integration.<br>

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FV2lKTpJL384zXVNxBOq4%2FCreate%20a%20new%20integration.png?alt=media&amp;token=d23e17cd-9999-4f93-b7b0-7e592e067c75" alt=""><figcaption></figcaption></figure>

4. Введите имя интеграции (любое на ваш вкус) и выберите рабочую область в поле **Associated workspace** и нажмите Create.

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FhRCMOmmaRaGcE41GjpIP%2F4%20%D0%BF%D1%83%D0%BD%D0%BA%D1%82%20%D1%81%D0%BA%D1%80%D0%B8%D0%BD.png?alt=media&amp;token=2eea2ee8-061d-491a-9beb-e88d14d2aca7" alt=""><figcaption></figcaption></figure>

4. Скопируйте ваш **Internal Integration Secret**

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2Fgit-blob-803617490e794aab4f202428a54e1bb2f8e746d2%2F7%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

7. Вставьте в поле **"Notion ключ"** на [странице подключения Notion](https://app.nextbot.ru/integrations?tab=NotionSettings) и нажмите на кнопку **"Сохранить"**.<br>

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2FXM1pPIyo34zOjBNcGAHg%2Fimage.png?alt=media&amp;token=22f5f1dc-91d2-4e40-9f11-de146fc72af2" alt=""><figcaption></figcaption></figure>

8. Перейдите на [главную страницу Notion](https://www.notion.so).
9. Перейдите на страницу с нужной базой данных. Нажмите на **"..."** в правом верхнем углу, выберите **"Connection to"**, свою интеграцию и нажмите **"Confirm"**.

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2Fgit-blob-178ab3ed9f2f627a18492d5eaa57e5a1d4106aab%2F9.png?alt=media" alt=""><figcaption></figcaption></figure>

10. Скопируйте из адресной строки код вашей таблицы (после **"notion.so/"** до **"?"**). Вставьте скопированный код базы данных в поле **"Код базы данных"** на этой странице.

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2Fgit-blob-cfb6d3bc2593363c2ab5afc629314ba09c50b4dd%2F10.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Интеграция поддерживает только Notion таблицы.**
{% endhint %}

<figure><img src="https://2593311972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fef2EBU68XAlye1NtG8DF%2Fuploads%2Fgit-blob-fd8a6ac66d406656983be57abcd4ac8d53a16ad0%2F12.png?alt=media" alt=""><figcaption></figcaption></figure>

После ввода кода базы вам откроются настройки базы данных. Выберите **"Чтение из базы данных"**, если хотите, чтобы агент мог читать данные из базы данных. Нажмите на кнопку **"Загрузить структуру базы данных"**.

Добавьте описание для столбцов (если требуется). Выберите **"Поиск"**, если требуется, чтобы агент использовал эти ячейки в качестве фильтров. Выберите **"Чтение"**, если хотите, чтобы агент мог прочитать эту ячейку. После настройки нажмите кнопку **"Сохранить"**.


---

# 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://doc.nextbot.ru/functional/integrations/notion/connection.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.
