Node Details

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

Parameters

Credential

  • Label: Connect Credential
  • Name: credential
  • Type: credential
  • Credential Names: notionApi

Inputs

  1. Text Splitter (optional)

    • Type: TextSplitter
    • Description: Used to split the loaded documents into smaller chunks if provided.
  2. Notion Database Id (required)

    • Type: string
    • Description: The ID of the Notion database to load. Can be found in the database URL.
  3. Additional Metadata (optional)

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

    • Type: string
    • Description: Comma-separated list of metadata keys to omit from the final documents. Use ’*’ to omit all default metadata keys.

Functionality

  1. Authenticates with Notion API using the provided credential.
  2. Loads data from the specified Notion database.
  3. Optionally splits the loaded documents using the provided text splitter.
  4. Applies additional metadata if provided.
  5. Omits specified metadata keys if requested.
  6. Returns an array of IDocument objects.

Usage

This node is particularly useful for:

  • Extracting structured data from Notion databases for further processing or analysis.
  • Preparing Notion database content for use in language models or other AI applications.
  • Creating a searchable knowledge base from Notion database entries.

Output

An array of IDocument objects, each representing a row from the Notion database, with the following structure:

  • pageContent: The main content of the database entry.
  • metadata: An object containing all database properties and any additional metadata, with specified keys omitted if requested.

Notes

  • Requires a Notion API integration token for authentication.
  • Supports high concurrency (default 64) for efficient loading of large databases.
  • Prepends a front matter header of the page properties to the page contents.