> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-update-1770920925-e15dbde.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Notion markdown export - integration

> Integrate with the Notion markdown export - document loader using LangChain JavaScript.

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 offical explanation [here](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={null}
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 });
};
```

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/javascript/integrations/document_loaders/file_loaders/notion_markdown.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
</Callout>

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