---
title: 导入 Notion 页面
slug: docs/cn/notion
createdAt: 2024-06-25T12:54:30.377Z
---

类似于 Confluence，您也可以将 AI 集成到外部的 Notion 页面中。您需要为一个 Notion 空间设置凭据和 URL，我们将从其中获取文档。

## 设置

1. 创建一个 [Notion integration ](https://www.notion.so/my-integrations)并安全记录 Internal Integration Secret（也称为 `NOTION_INTEGRATION_TOKEN`）。
2. 在您的页面或数据库上为新的集成添加连接。为此，请打开您的 Notion 页面，转到右上角的 Settings，然后向下滚动到 `添加连接`，并选择您的新集成。
3. 获取您想加载的页面的 `PAGE_ID` 或 `DATABASE_ID`。URL 路径中的 32 位十六进制字符即为该 ID。例如：

:::BlockQuote
PAGE\_ID 示例：[https://www.notion.so/skarard/LangChain-Notion-API-b34ca03f219c4420a6046fc4bdfdf7b4](https://www.notion.so/skarard/LangChain-Notion-API-b34ca03f219c4420a6046fc4bdfdf7b4) 的 PAGE\_ID 是 [`b34ca03f219c4420a6046fc4bdfdf7b4`](https://www.notion.so/skarard/LangChain-Notion-API-b34ca03f219c4420a6046fc4bdfdf7b4)
:::

![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/lAN9qJDGGMl_mEB_1kFXJ_aiext-notion-light.png "导入 Notion 页面")

