Document loaders
Notion Page Document Loader
The Notion Page Document Loader is a component designed to load data from a Notion page, including all child pages, and convert them into separate documents. This loader is particularly useful for integrating Notion content into natural language processing pipelines or other document-based workflows.
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
-
Text Splitter (optional)
- Type: TextSplitter
- Description: A text splitter to break down large documents into smaller chunks.
-
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.
-
Additional Metadata (optional)
- Type: JSON
- Description: Additional metadata to be added to the extracted documents.
-
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
- Initializes a NotionAPILoader with the provided Notion integration token and page ID.
- Loads documents from the specified Notion page.
- If a text splitter is provided, splits the loaded documents.
- Applies additional metadata if specified.
- Omits metadata keys as requested.
- 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.