Node Details

  • Name: NotionFolder_DocumentLoaders
  • Type: Document
  • Category: Document Loaders
  • Version: 1.0

Input Parameters

  1. Notion Folder (required)

    • Type: string
    • Description: The path to the folder containing the exported Notion content
  2. Text Splitter (optional)

    • Type: TextSplitter
    • Description: An optional text splitter to break down large documents into smaller chunks
  3. Additional Metadata (optional)

    • Type: JSON
    • Description: Additional metadata to be added to the extracted documents
  4. Omit Metadata Keys (optional)

    • Type: string
    • Description: A comma-separated list of metadata keys to omit from the final output. Use ’*’ to omit all default metadata keys except those specified in Additional Metadata.

Output

The node outputs an array of IDocument objects, each representing a document from the Notion folder with the following structure:

  • pageContent: The text content of the document
  • metadata: An object containing metadata about the document

Functionality

  1. Loads documents from the specified Notion folder
  2. Optionally splits the documents using the provided text splitter
  3. Adds any additional metadata specified
  4. Omits metadata keys as requested
  5. Returns the processed documents

Use Cases

  • Importing Notion content into a knowledge base
  • Processing Notion exports for analysis or search functionality
  • Preparing Notion content for use in language models or other AI applications

Notes

  • The node uses the NotionLoader from the @langchain/community package
  • It supports flexible metadata handling, allowing for customization of the output
  • The text splitting feature enables processing of large Notion exports into more manageable chunks