Intermediate

Document & Spreadsheet Loader Nodes: File Ingestion & Chunking

Ingest Word documents, spreadsheets, and public cloud links, inspect metrics, and automatically split long content into organized canvas clusters.

# Document & Spreadsheet Loader Nodes: File Ingestion & Chunking
### *Bringing external documents, manuscripts, and tabular datasets directly onto your visual canvas.*

Authoring modular documents often starts with existing raw materials: research papers, product specifications, customer interview transcripts, or spreadsheet datasets. The **Document Loader Node** streamlines the ingestion phase of your workflow by parsing files client-side, computing structural metrics, and automatically generating organized clusters of connected canvas nodes.

---

## 1. Supported Formats & Ingestion Methods

The Loader Node supports two convenient ingestion methods:

### Direct File Upload & Drag-and-Drop
Drop a file directly onto the dashed upload zone or click to open your system file picker:
- **Microsoft Word (`.docx`)**: Extracts full document structure including headings, body paragraphs, and lists.
- **Spreadsheets (`.xlsx`, `.csv`)**: Parses multi-sheet workbooks and tabular data into structured row records and column headers.
- **Markdown & Plain Text (`.md`, `.txt`)**: Ingests narrative drafts, technical documentation, or raw notes.

### Public Cloud Links
Paste a public viewable link from **Google Docs**, **Google Sheets**, or **Office 365** into the cloud link field and click **Load**:
- Nodestr securely fetches the public export format directly into your browser without requiring account credentials.
- Ideal for quickly pulling live collaborative drafts into your spatial canvas.

---

## 2. File Inspection & Metrics

Once a file is loaded, the node switches to an evaluated summary view displaying immediate structural metrics:

1. **Document Metrics**:
   - Total word count (e.g. `12,450 words`).
   - Planned chunk count and recommended grid dimensions (e.g. `8 chunks • 4×2 Grid`).
2. **Spreadsheet Metrics**:
   - Total row count and active sheet column count.
   - Interactive sheet tabs allowing you to select a specific worksheet or ingest all sheets simultaneously.

---

## 3. Intelligent Document Chunking

Long documents are difficult to navigate and edit as a single massive block. The Loader Node provides four flexible chunking strategies to split your document into digestible modular cards:

1. **Paragraph Mode**:
   - Splits text based on natural paragraph boundaries, ideal for interview transcripts and narrative dialogue.
2. **Heading 2 (`H2`) Mode**:
   - Splits text at major section headings, creating one canvas node per chapter or technical topic.
3. **Fixed Size Mode**:
   - Divides text into balanced character budgets with boundary preservation, ideal for feeding into AI Agent context windows.
4. **Custom Delimiter Mode**:
   - Splits content whenever a specific divider string occurs (e.g. `---` or `###`).

---

## 4. Automated Noodle Chaining & Containment

When generating your canvas nodes, you can control how the resulting cards connect and organize themselves:

### Noodle Chaining Options
- **Sequence (`1 → 2 → 3`)**: Automatically wires the output of each chunk to the input of the next chunk, preserving linear narrative progression.
- **Collector Node**: Generates all chunks as parallel cards and connects them into a central collector card for unified downstream compilation.
- **No Connections**: Places all chunks on the canvas as independent, unlinked modular cards.

### Visual Containment Options
- **Canvas Frame (Default)**: Wraps the generated grid of nodes inside a color-coded canvas frame for easy group movement and visual organization.
- **Group Node**: Encapsulates all generated chunks inside a nested Group Node, keeping your top-level canvas clean.
- **None**: Places the nodes directly onto the open canvas.

Clicking **`[ Generate N Nodes ]`** creates the entire structured cluster in seconds.

---

## 5. Raw Document Pass-Through (`Raw Out`)

You do not have to split a file into multiple chunks to work with it. Every Loader Node features a right-hand **`Raw Out`** port at the bottom:
- Connect `Raw Out` directly into an **Output Hub**, an **AI Agent Node**, a **Find & Replace Node**, or a **Document Exporter Node**.
- Emits the complete, unchunked text of the loaded file directly downstream, making the Loader Node an effortless file adapter for your visual graph.

---

## 6. Troubleshooting & Quick Fixes

| Issue | Likely Cause | Solution |
| :--- | :--- | :--- |
| **Cloud link fails to load** | The Google Doc or Google Sheet is private or requires domain permissions. | Open the document in Google Drive, set Share permissions to *"Anyone with the link can view"*, and re-paste the link. |
| **Generated chunks are too large or small** | The selected chunking strategy did not match the document layout. | Before clicking Generate, switch the Chunking Method to **Heading 2** (for titled documents) or **Paragraph** (for prose), and check the preview chunk count. |
| **File exceeded character budget** | The file contains more text than the active plan tier permits. | In Local Mode, documents up to ~30,000 words are supported; upgrade to Cloud or break massive manuscripts into separate project files. |