The Document Parsing Node extracts structured parameters from input documents. After configuring the file type and parser, it generates structured output variables based on document content—ideal for document content extraction, table data parsing, and document information statistics. This node is currently free of charge.
Usage Example
For example, to parse a document and generate a summary:A workflow receives a document file, uses the Document Parsing Node to extract its content, and then passes the extracted content to a Large Language Model (LLM) Node to generate a document summary.
Connecting the Node
Method 1: Add via the + Button
-
Hover your mouse over any node on the canvas (e.g., the Start Node); a
+button automatically appears on its right side. -
Click the
+button and select Data → Document Parsing from the pop-up node list. The node will be automatically added to the canvas and connected to the upstream node.
Method 2: Drag from the Node Library
- In the left-side node library, locate and select Data → Document Parsing.
- Drag the node onto the canvas at your desired location, then drag a connection line from the edge of an upstream node to the Document Parsing Node.
Core Configuration
File Type
Specifies the type of document to be parsed.
| Option | Supported Formats | Output Variable |
|---|---|---|
| Other | .pdf, .doc, .docx, .wps, .ppt, .pptx, .md, .txt | Outputs a layout array containing Markdown-formatted content |
| Excel | .xlsx, .xls, .xlsm | Outputs a cells array containing cell-level information |
Input
Specifies the document to be parsed. Supports either:
- A
String-typed URL, or - A
File-typed variable from the Start Node.
File-typed variable from the Start Node, the actual value passed is a JSON object containing fields such as mimeType, name, size, source, type, and url. Locally uploaded files are first uploaded to OSS and then passed into the node as temporary URLs.
File restrictions:
- Single file size must not exceed 150 MB, and page count must not exceed 15,000 pages.
- Only single-file parsing is supported; batch or list-based file parsing is not supported.
Parser Selection
Specifies the parser used to process the document. Different parsers vary in accuracy and speed. Available options depend on the selected file type:
When File Type = “Other”:
| Parser Type | Accuracy | Speed | Notes |
|---|---|---|---|
| LLM-based Document Parser | Good | Fast | Uses built-in LLMs; prompt customization is not supported. |
| Intelligent Document Parser | Good | Fast | Balances accuracy and speed. |
| Electronic Document Parser | Medium | Fastest | Optimized for rapid parsing scenarios. |
| Parser Type | Accuracy | Speed | Notes |
|---|---|---|---|
| LLM-based Document Parser | Good | Fast | Uses built-in LLMs for parsing. |
| Electronic Document Parser | Medium | Fastest | Optimized for rapid parsing. |
Node Output
The Document Parsing Node outputs different variable structures depending on the selected file type. Below are the common output variables:
| Variable Name | Type | Description |
|---|---|---|
docId | String | Unique document ID |
totalPages | Number | Total number of pages |
wordCount | Number | Total word count |
docType | String | File type (e.g., "pdf", "xlsx") |
| Variable Name | Type | Description |
|---|---|---|
layoutCount | Number | Number of paragraphs |
layout | Array<Object> | Array of paragraph objects. Each object contains the following sub-fields: |
layout[].uniqueId:String— Unique identifier for the paragraphlayout[].markdownContent:String— Paragraph content in Markdown formatlayout[].pageNum:Number— Page number where the paragraph appears
| Variable Name | Type | Description |
|---|---|---|
cells | Array<Object> | Array of cell objects. Each object contains the following sub-fields: |
cells[].cellUniqueId | String | Unique identifier for the cell |
cells[].vertical | String | Column index (e.g., "A", "B") |
cells[].horizontal | String | Row index (e.g., "1", "2") |
cells[].text | String | Cell content |
Common Use Cases
| Paired Node | Typical Usage |
|---|---|
| Start Node → Document Parsing Node | Configure a custom File-typed variable in the Start Node to upload a document, then parse it in the subsequent Document Parsing Node. |
| Document Parsing Node → LLM Node | Pass structured output (e.g., markdownContent) to an LLM Node to generate summaries, answer questions, or extract key information. |
| Document Parsing Node → Conditional Node | Perform conditional branching based on parsing results (e.g., docType, totalPages, wordCount). |
| Document Parsing Node → Variable Processing Node | Extract and transform specific fields from parsing results (e.g., format conversion, data cleaning). |
| Document Parsing Node → Batch Processing Node | Feed the layout array into a Batch Processing Node to handle each paragraph in parallel (e.g., translate or summarize each paragraph individually). |
Frequently Asked Questions
Why does parsing fail when providing a document URL?
Ensure the provided URL is a direct download link to the document file (e.g., ending in .pdf, .docx, .txt, etc.), not a webpage URL. Webpage URLs are not valid document files and will cause parsing to fail.