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

# Notion Markdown 导出 - 集成

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

本示例将介绍如何从 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="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/i18n\zh-CN\oss\javascript\integrations\document_loaders\file_loaders\notion_markdown.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>
</div>
