Reference · Tools
Extract from File
Extract structured data from binary files. Supports CSV, spreadsheets (XLS, XLSX, ODS), HTML tables, RTF, PDF, JSON, text, XML, ICS calendar, and base64 conversion.
The Extract from File node reads binary files attached to workflow items and converts them into structured JSON data you can act on immediately. For tabular formats like CSV and XLSX, it expands one file into one item per row — making it practical to loop over spreadsheet exports and write each row to a database. No credentials or external services are needed for most operations.
- Node type
- Action (binary)
- Parameters
- 8
- Outputs
- Output, Error
- Credentials
- None required
Extract from File
Extract structured data from binary files (CSV, spreadsheets, PDF, JSON, XML, text, ICS)
Overview
The Extract from File tool parses binary file data attached to workflow items and converts it into structured JSON output. For tabular formats (CSV, XLSX, XLS, ODS, HTML, RTF), it produces one output item per row — this is a 1:N expansion. For non-tabular formats (PDF, JSON, text, XML, ICS, base64) and for the markdown/OCR operations, it produces one output item per input item (1:1). No credentials required — all parsing is local, apart from the vision-assisted operations, which use an AI model.
Category: Core Nodes
Tool Name: extract_from_file
Version: 1
Appearance: Icon: lucide-FileOutput | Color: #2244FF
Node Type
Action (Binary) — handles file/binary data operations
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool does not require any credentials.
Operations
| Operation | Value | Description |
|---|---|---|
| Extract From CSV | csv | Transform a CSV file into output items |
| Extract From HTML | html | Transform a table in an HTML file into output items |
| Extract From ICS | fromIcs | Transform an ICS calendar file into output items |
| Extract From JSON | fromJson | Transform a JSON file into output items |
| Extract From ODS | ods | Transform an ODS file into output items |
| Extract From PDF | pdf | Extract content and metadata from a PDF file |
| Extract From RTF | rtf | Transform a table in an RTF file into output items |
| Extract From Text File | text | Extract the content of a text file |
| Extract From XML | xml | Extract the content of an XML file |
| Extract From XLS | xls | Transform an Excel XLS file into output items |
| Extract From XLSX | xlsx | Transform an Excel XLSX file into output items |
| Move File to Base64 String | binaryToProperty | Convert a file into a base64-encoded string |
| PDF to Markdown (Advanced) | pdfToMarkdown | Extract PDF to structured markdown with Vision OCR fallback for scanned documents |
| Document to Markdown | documentToMarkdown | Convert DOCX, XLSX, PPTX, HTML, EPUB and other documents to markdown |
| Image OCR + Description | imageOCR | Extract text via OCR and generate a visual description of the image |
Parameters
Operations that share a parameter set are documented together.
Extract From CSV / HTML / RTF / ODS / XLS / XLSX (csv, html, rtf, ods, xls, xlsx)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Options | collection | No | {} | Parsing options for the tabular file. |
| — Delimiter | string | No | , | Set the field delimiter for CSV parsing. (shown when Operation is csv) |
| — Encoding | options | No | utf-8 | The character encoding of the CSV file. (shown when Operation is csv) |
Options: ascii, latin1, ucs-2, ucs2, utf-8, utf16le, utf8 | ||||
| — Exclude Byte Order Mark (BOM) | boolean | No | false | Whether to detect and exclude the byte-order-mark from the CSV input if present. (shown when Operation is csv) |
| — Preserve Quotes | boolean | No | false | Whether to handle unclosed quotes in CSV fields as part of the field content instead of throwing a parsing error. (shown when Operation is csv) |
| — Header Row | boolean | No | true | Whether the first row of the file contains the header names. (shown when Operation is csv, html, ods, xls, xlsx) |
| — Include Empty Cells | boolean | No | false | Whether to include empty cells. They will be filled with an empty string. (shown when Operation is csv, html, ods, xls, xlsx) |
| — Max Number of Rows to Load | number | No | -1 | Stop handling records after the requested number of rows are read. Use -1 to load all rows. (shown when Operation is csv) |
| — Range | string | No | — | The range to read from the table. If set to a number it will be the starting row. If set to a string it will be used as A1-style notation range. (shown when Operation is ods, xls, xlsx) |
| — RAW Data | boolean | No | false | Whether to return RAW data instead of parsing it. (shown when Operation is ods, xls, xlsx, html, rtf) |
| — Read As String | boolean | No | false | In some cases and file formats, it is necessary to read as string to ensure special characters are interpreted correctly. (shown when Operation is ods, xls, xlsx, html, rtf) |
| — Sheet Name | string | No | — | Name of the sheet to read from in the spreadsheet. If not set, the first sheet will be used. (shown when Operation is ods, xls, xlsx) |
| — Starting Line | number | No | 0 | Start handling records from the requested line number. Starts at 0. (shown when Operation is csv) |
| — Skip Records With Errors | fixedCollection | No | { value: { enabled: false, maxSkippedRecords: -1 } } | How to handle rows that fail to parse. (shown when Operation is csv) |
| — — Enabled | boolean | No | false | Whether to skip records with errors when reading from file. |
| — — Max Skipped Records | number | No | -1 | The maximum number of records that can be skipped. Set to -1 to remove limit. |
Extract From JSON / Text File / XML / ICS and Move File to Base64 String (fromJson, text, xml, fromIcs, binaryToProperty)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Destination Output Field | string | Yes | data | The name of the output JSON field to place the extracted data in. Supports dot notation for nested paths. |
| Options | collection | No | {} | Decoding options and what to keep from the input item. |
| — File Encoding | options | No | utf8 | Specify the encoding of the file, defaults to UTF-8. (shown when Operation is fromJson, text, fromIcs, xml) |
Options: armscii8, ascii, base64, big5hkscs, binary, cesu8, cp1046, cp1124, cp1125, cp1129, cp1133, cp1161, cp1162, cp1163, cp437, cp720, cp737, cp775, cp808, cp850, latin1, ucs2, utf16le, utf8 | ||||
| — Strip BOM | boolean | No | true | Whether to strip the BOM (Byte Order Mark) from the file. (shown when Operation is fromJson, text, fromIcs, xml) |
| — Keep Source | options | No | json | What data from the input item to keep on the output. |
Options: json (include JSON data of the input item), binary (include binary data of the input item), both |
Extract From PDF (pdf)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Options | collection | No | {} | Page handling, password and source-retention settings. |
| — Join Pages | boolean | No | true | Whether to join the text from all pages into a single string or return an array of text from each page. |
| — Keep Source | options | No | json | What data from the input item to keep on the output. |
Options: json (include JSON data of the input item), binary (include binary data of the input item), both | ||||
| — Max Pages | number | No | 0 | Maximum number of pages to include. Set to 0 for all pages. |
| — Password | string | No | — | Password for encrypted PDF files. |
PDF to Markdown / Document to Markdown / Image OCR (pdfToMarkdown, documentToMarkdown, imageOCR)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Destination Output Field | string | Yes | data | The name of the output JSON field to place the extracted data in. Supports dot notation for nested paths. |
| Options | collection | No | {} | OCR and source-retention settings. |
| — Enable Vision OCR Fallback | boolean | No | true | For scanned PDFs: if text extraction returns less than 50 characters, render pages as images and read them with a vision model. (shown when Operation is pdfToMarkdown) |
| — Max Pages (OCR) | number | No | 20 | Maximum number of pages to render for Vision OCR (scanned PDFs only). Higher values increase cost and processing time. (shown when Operation is pdfToMarkdown) |
| — Keep Source | options | No | json | What data from the input item to keep on the output. |
Options: json (include JSON data of the input item), binary (include binary data of the input item), both |
All Operations
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Input Binary Field | string | Yes | data | The name of the input binary field containing the file data to be processed. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. |
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. |
Output Data
How many items come out, and what is on them, depends on the family the operation belongs to.
Tabular operations (csv, html, rtf, ods, xls, xlsx)
One output item per row — a 1000-row spreadsheet becomes 1000 items. The row replaces the item JSON entirely; the input item’s own fields are not merged in. The input binary is forwarded onto every row item, so a downstream node still sees the source file.
With Header Row on (the default), each item is an object keyed by the header names:
{
"name": "Ada Lovelace",
"email": "ada@example.com",
"signups": 12
}
With Header Row off, the values arrive positionally under a single row array:
{
"row": ["Ada Lovelace", "ada@example.com", 12]
}
A file that parses to zero rows produces no output items at all for that input item.
PDF (pdf)
One output item carrying the document’s text and metadata:
{
"numpages": 12,
"numrender": 12,
"info": { "Title": "Annual Report", "Author": "Finance" },
"metadata": {},
"text": "Page one text…\n\nPage two text…",
"version": "4.0.379"
}
textis a single joined string when Join Pages is on, and an array with one entry per page when it is off.numpagesis the document’s real page count even when Max Pages limited how much text was read.infois the PDF’s own document-info dictionary, ornullwhen the file carries none.
Single-value operations (fromJson, text, xml, fromIcs, binaryToProperty) and the markdown/OCR operations
One output item, with the extracted value written at Destination Output Field. A dotted name such as document.content creates the nesting it needs.
| Operation | Value written to the field |
|---|---|
fromJson | The parsed JSON — an object or array, not a string. An empty file yields {}, and a file that is not valid JSON fails the item. |
text | The decoded file contents as a string. |
xml | The decoded file contents as a string, left as XML for a downstream parser. |
fromIcs | The parsed calendar as an object. |
binaryToProperty | The file as a base64-encoded string. |
pdfToMarkdown, documentToMarkdown, imageOCR | The extracted text as a markdown string. |
Keep Source
Keep Source controls what survives from the input item, for every operation that offers it:
| Value | Output JSON | Output binary |
|---|---|---|
json | Input fields kept, result added | The source binary property is removed; other binary properties are kept |
binary | Input fields dropped, result only | All input binary kept, including the source |
both | Input fields kept, result added | All input binary kept, including the source |
Dropping the source file with json is the default because a parsed file is usually no longer needed and carrying it forward costs storage on every downstream item.
Usage Examples
- Parse a CSV file into individual row items
- Extract all rows from an Excel XLSX spreadsheet
- Extract text and metadata from a PDF document
- Parse a JSON file from binary data
- Extract XML content from a binary file
- Parse an ICS calendar file into structured events
- Convert a binary file to a base64 string
- Read an ODS spreadsheet with a specific sheet name
- Parse CSV with custom delimiter and encoding
Example Configuration
Parse a CSV with headers:
{
"type": "extract_from_file",
"parameters": {
"operation": "csv",
"binaryPropertyName": "data",
"maxConcurrency": 10,
"options": {
"delimiter": ",",
"encoding": "utf-8",
"headerRow": true,
"includeEmptyCells": false
}
}
}
Read a named sheet and a cell range from an Excel workbook:
{
"type": "extract_from_file",
"parameters": {
"operation": "xlsx",
"binaryPropertyName": "excelFile",
"maxConcurrency": 5,
"options": {
"sheetName": "DataSheet",
"range": "A1:Z100",
"headerRow": true,
"maxRowCount": 50
}
}
}
Extract text from a password-protected PDF, capped at ten pages:
{
"type": "extract_from_file",
"parameters": {
"operation": "pdf",
"binaryPropertyName": "pdfData",
"maxConcurrency": 3,
"options": {
"joinPages": true,
"maxPages": 10,
"password": "secret123",
"keepSource": "json"
}
}
}
Parse a JSON file into a nested output field:
{
"type": "extract_from_file",
"parameters": {
"operation": "fromJson",
"binaryPropertyName": "jsonFile",
"destinationKey": "parsedData.content",
"maxConcurrency": 10,
"options": {
"encoding": "utf8",
"stripBOM": true,
"keepSource": "json"
}
}
}
Convert a file to base64 for an API that expects it inline:
{
"type": "extract_from_file",
"parameters": {
"operation": "binaryToProperty",
"binaryPropertyName": "imageFile",
"destinationKey": "base64Image",
"maxConcurrency": 10,
"options": {
"keepSource": "json"
}
}
}
Pull the rows out of an HTML table:
{
"type": "extract_from_file",
"parameters": {
"operation": "html",
"binaryPropertyName": "htmlContent",
"maxConcurrency": 10,
"options": {
"encoding": "utf-8",
"headerRow": true,
"includeEmptyCells": false
}
}
}
Read an XML file into a field for a downstream parser:
{
"type": "extract_from_file",
"parameters": {
"operation": "xml",
"binaryPropertyName": "xmlData",
"destinationKey": "xmlContent",
"maxConcurrency": 10,
"options": {
"encoding": "utf8",
"stripBOM": true
}
}
}
Process a spreadsheet, tolerating up to ten bad rows:
{
"type": "extract_from_file",
"parameters": {
"operation": "xlsx",
"binaryPropertyName": "spreadsheetData",
"maxConcurrency": 5,
"options": {
"headerRow": true,
"includeEmptyCells": false,
"maxRowCount": 1000,
"readAsString": false,
"skipRecordsWithErrors": {
"value": {
"enabled": true,
"maxSkippedRecords": 10
}
}
}
}
}
Turn a scanned PDF into markdown, letting OCR handle image-only pages:
{
"type": "extract_from_file",
"parameters": {
"operation": "pdfToMarkdown",
"binaryPropertyName": "data",
"destinationKey": "document.markdown",
"options": {
"enableOCR": true,
"maxPages": 20,
"keepSource": "json"
}
}
}
Parse an ICS calendar file into structured events:
{
"type": "extract_from_file",
"parameters": {
"operation": "fromIcs",
"binaryPropertyName": "calendarFile",
"destinationKey": "events",
"maxConcurrency": 10,
"options": {
"encoding": "utf8",
"keepSource": "json"
}
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Parse binary files (CSV, XLSX, PDF, JSON, XML, text, ICS) into structured JSON data — tabular formats produce one output item per row.
Common Patterns
- Spreadsheet data processing — use
xlsxorodswith Header Row on, cap the run with Max Number of Rows to Load while testing, and enable Skip Records With Errors for messy exports. - Document content extraction — use
textwith a dotted Destination Output Field so the content lands in a tidy nested structure. - Calendar data processing — use
fromIcsand read the events out of the destination field downstream.
Choosing a PDF operation
pdfis local, fast and free. Use it for PDFs with a real text layer.pdfToMarkdownpreserves structure — headings, lists, tables — and falls back to vision OCR for scanned pages, which costs model tokens. Use it when layout matters or the PDF is a scan.
Notes
- The operation, not the file name, decides how the bytes are parsed. Pointing
csvat a spreadsheet fails the item. - Tabular extraction multiplies your item count. Add a Limit or Filter node downstream before writing rows to an external system.
documentToMarkdownreads the file name from the binary property to pick a converter, so upstream nodes should keep a correct extension on the file.
Frequently asked questions
Does Extract from File need any API keys or credentials to run?
No credentials are required for the core parsing operations (CSV, XLSX, PDF, JSON, XML, ICS, text, and so on) — all of that parsing happens locally within your workflow. The exception is the vision-assisted PDF and document operations (`pdfToMarkdown` with scanned pages), which call an AI model and therefore consume model tokens.
My workflow item count explodes after this node. What's happening?
This is expected behaviour for tabular formats. CSV, XLSX, XLS, ODS, HTML tables, and RTF all produce one output item per row in the source file, so a 500-row spreadsheet becomes 500 items downstream. If you're writing results to an external system, add a Limit or Filter node right after Extract from File to control volume before anything expensive runs.
What's the difference between the `pdf` and `pdfToMarkdown` operations?
`pdf` is local, fast, and costs nothing — use it whenever the PDF has a real embedded text layer. `pdfToMarkdown` preserves document structure (headings, lists, tables) and automatically falls back to vision OCR for scanned or image-only pages, but that fallback uses an AI model and costs tokens. Choose `pdf` for simple text extraction and `pdfToMarkdown` when layout matters or you're dealing with scans.
Can I point the `csv` operation at an XLSX file to save a step?
No — the operation you select determines how the raw bytes are interpreted, regardless of what the file is actually named. Pointing `csv` at a spreadsheet binary will fail the item. Use `xlsx` for XLSX files, `ods` for ODS files, and so on. The file name has no effect on which parser runs.
How should I handle spreadsheet exports that have blank rows or bad values mixed in?
Enable **Skip Records With Errors** when configuring a spreadsheet operation — this lets valid rows pass through even if individual rows fail to parse. You can also set **Max Number of Rows to Load** during development so you're not processing an entire file on every test run. Both options are available for the XLSX, XLS, and ODS operations.
Build with the Extract from File node
Drop it into a workflow, wire it to an agent, or call it on a schedule.
Open BusyBotLast updated . Spotted something wrong? Tell us.