Node Details

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

Credentials

  • Type: Notion API
  • Required: Yes
  • Description: Connects to the Notion API using an integration token.

Input Parameters

  1. Text Splitter (optional)

    • Type: TextSplitter
    • Description: A text splitter to break down large documents into smaller chunks.
  2. Notion Page Id (required)

    • Type: string
    • Description: The 32-character hexadecimal ID of the Notion page to load. This can be found in the URL of the Notion page.
  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 documents. Use ’*’ to omit all default metadata keys except those specified in Additional Metadata.

Output

An array of IDocument objects, each representing a page or subpage from the specified Notion page. Each document contains:

  • Page content
  • Metadata (either default or customized based on input parameters)

Functionality

  1. Initializes a NotionAPILoader with the provided Notion integration token and page ID.
  2. Loads documents from the specified Notion page.
  3. If a text splitter is provided, splits the loaded documents.
  4. Applies additional metadata if specified.
  5. Omits metadata keys as requested.
  6. Returns the processed array of documents.

Use Cases

  • Content aggregation from Notion for further processing or analysis
  • Preparing Notion-based documentation for use in language models or search systems
  • Creating a knowledge base from Notion pages for Q&A systems

Notes

  • Ensure you have the necessary Notion API credentials and permissions to access the specified page.
  • The node supports customization of metadata, allowing for flexible integration with various downstream processes.
  • Text splitting can be useful for handling large Notion pages or for preparing content for specific NLP tasks.