Class: NotionReader
Notion pages are retrieved recursively and converted to Document objects. Notion Database can also be loaded, and the serialization method can be customized.
[Note] To use this reader, must be created the Notion integration must be created in advance Please refer to this document for details.
Implements
Constructors
new NotionReader()
new NotionReader(
options
):NotionReader
Constructor for the NotionReader class
Parameters
• options: NotionReaderOptions
Configuration options for the reader
Returns
Source
packages/core/src/readers/NotionReader.ts:22
Properties
crawl()
private
readonly
crawl: (rootPageId
) =>AsyncGenerator
<CrawlingResult
<object
>,any
,unknown
>
Parameters
• rootPageId: string
Returns
AsyncGenerator
<CrawlingResult
<object
>, any
, unknown
>
Source
packages/core/src/readers/NotionReader.ts:16
Methods
loadData()
Loads recursively Notion pages and converts them to an array of Document objects
Parameters
• rootPageId: string
The root Notion page ID
Returns
Promise
<Document
<Metadata
>[]>
A Promise that resolves to an array of Document objects
Implementation of
Source
packages/core/src/readers/NotionReader.ts:67
loadPages()
loadPages(
rootPageId
):Promise
<Page
[]>
Loads recursively the Notion page with the specified root page ID.