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

# Notion markdown export - 集成

> 使用 LangChain JavaScript 集成 Notion markdown export - document loader。

This example goes over how to load data from your Notion pages exported from the notion dashboard.

First, export your notion pages as **Markdown & CSV** as per the [official Notion export instructions](https://www.notion.so/help/export-your-content). Make sure to select `include subpages` and `Create folders for subpages.`

Then, unzip the downloaded file and move the unzipped folder into your repository. It should contain the markdown files of your pages.

Once the folder is in your repository, simply run the example below:

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

export const run = async () => {
  /** Provide the directory path of your notion folder */
  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) 或 [提交 issue](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
