> ## Documentation Index
> Fetch the complete documentation index at: https://cndoc-langchain.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Notion markdown 导出 - 集成

> 使用 LangChain JavaScript 与 Notion markdown 导出 - 文档加载器进行集成。

本示例介绍如何从 Notion 仪表板导出的 Notion 页面加载数据。

首先，按照[官方 Notion 导出说明](https://www.notion.so/help/export-your-content)，将您的 Notion 页面导出为 **Markdown & CSV** 格式。请确保选中 `包含子页面` 和 `为子页面创建文件夹` 选项。

然后，解压下载的文件，并将解压后的文件夹移动到您的仓库中。该文件夹应包含您页面的 markdown 文件。

一旦文件夹放入您的仓库，只需运行以下示例：

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { NotionLoader } from "@langchain/community/document_loaders/fs/notion";

export const run = async () => {
  /** 提供您的 Notion 文件夹的目录路径 */
  const directoryPath = "Notion_DB";
  const loader = new NotionLoader(directoryPath);
  const docs = await loader.load();
  console.log({ docs });
};
```

***

<div className="source-links">
  <Callout icon="terminal-2">
    [连接这些文档](/use-these-docs) 到 Claude、VSCode 等，通过 MCP 获取实时答案。
  </Callout>

  <Callout icon="edit">
    [在 GitHub 上编辑此页面](https://github.com/langchain-ai/docs/edit/main/src/oss/javascript/integrations/document_loaders/file_loaders/notion_markdown.mdx) 或 [提交问题](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
