> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.alephant.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.alephant.io/_mcp/server.

# Notion

> 为已批准的页面、后代页面、数据库与页面内容配置 Notion Integration Token 索引。

## 索引内容

Notion 连接器会索引已共享给 Integration 的页面，包括页面 Property 和受支持的 Block 内容。它还会发现 Database 层级、查询 Database Data Source，并索引其中的页面。受支持内容包括嵌套子页面、Rich Text Block、Table 和 People Property。

| Root Page ID | 索引效果                                                |
| ------------ | --------------------------------------------------- |
| 留空           | 搜索 Integration 可访问的页面，并发现可访问的 Database Data Source。 |
| 已设置          | 索引该页面并递归遍历其子页面和 Database。该页面必须共享给 Integration。      |

提供 Root Page 时，连接器会使用递归遍历。没有 Root Page 时，部署配置也可以启用递归查找，以补偿 Notion Search 未返回的页面。

## 前置条件

* 在内容所属 Workspace 中创建 Notion Internal Integration。
* 将每个已批准的顶层页面或 Workspace 区域共享给 Integration。Integration Token 无法发现未共享给它的内容。
* 复制 Integration Token；需要缩小连接器范围时，再复制 Root Page ID。
* OpenCore Admin 必须决定索引所有 Integration 可访问页面，还是仅索引一个已批准的子树。
* 允许连接器 Worker 出站 HTTPS 访问 `api.notion.com`。

## 凭据

| 方式                         | OpenCore 凭据值                                           | 说明                                                                               |
| -------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------- |
| Internal Integration Token | `notion_integration_token: <NOTION_INTEGRATION_TOKEN>` | Token 会通过 Notion API Authorization Header 发送。只将其保存在 OpenCore Credential Store 中。 |

Notion 索引连接器未实现 OAuth。其他应用功能使用的 Notion OAuth 不会创建该连接器凭据。

## 在 OpenCore 中配置

1. 在 Notion 中把已批准的源页面共享给 Internal Integration。
2. 在 OpenCore Admin 后台打开 **Connectors**，选择 **Notion**，然后创建 Integration Token 凭据。
3. 将 **Root Page ID** 留空可索引 Integration 能发现的所有页面；输入一个已批准的 Page ID，则只索引该页面及其后代。
4. 对受限内容选择 **Private** 并分配 OpenCore 用户组；只有当所有账号都可搜索时才选择 **Public**。
5. 设置刷新和清理选项，创建连接器，然后运行首次索引尝试。
6. 审查已索引页面范围后，再将生成的文档集附加给 Agent。

## 权限

Notion 连接器不支持源权限同步。它使用 Integration 的访问权决定可以摄取哪些内容，但不会把每个 Notion 页面的 Viewer 列表复制到 OpenCore。

这意味着可以访问连接器或其文档集的 OpenCore 用户能够搜索所有已索引 Notion 内容，即使该用户无法在 Notion 中打开每个源页面。请为不同的源边界使用独立 Integration/Connector，并使用 OpenCore **Private** 访问模式显式分配用户组。不要对混合敏感度的 Notion 内容使用 **Public**。

## 验证

1. 确认凭据验证能够搜索一个页面，或直接获取所配置的 Root Page。
2. 运行索引尝试，并搜索 Root Page 和一个嵌套子页面中的文本。
3. 当内容存在时，验证一个 Database Row、Table Cell 或 People Property 是否可搜索。
4. 确认未共享页面或配置 Root 子树之外的页面不存在。
5. 由于 Notion 源 ACL 不会同步，请使用分配给连接器的每个 OpenCore 用户组测试访问。

## 故障排除

| 现象                      | 检查项                                              |
| ----------------------- | ------------------------------------------------ |
| 验证时出现 HTTP 401          | 替换无效或已过期的 Integration Token。                     |
| 验证时出现 HTTP 403          | 为 Integration 授予所选 Notion 内容的充分访问权。              |
| Root Page 出现 HTTP 404   | 检查 Page ID，并将该页面共享给 Integration。                 |
| 未配置 Root 时缺少页面          | 将页面共享给 Integration；可考虑使用已批准 Root Page，让递归遍历明确范围。 |
| 用户可以搜索其无法在 Notion 打开的页面 | 未同步源权限时这是预期行为；请拆分连接器并用 OpenCore 用户组限制访问。         |

## 相关页面

* [连接器与索引](/opencore/knowledge/connectors)
* [索引设置](/opencore/knowledge/index-settings)