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.

Action (binary) Core Nodes v1 Binary data

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

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool does not require any credentials.

Operations

OperationValueDescription
Extract From CSVcsvTransform a CSV file into output items
Extract From HTMLhtmlTransform a table in an HTML file into output items
Extract From ICSfromIcsTransform an ICS calendar file into output items
Extract From JSONfromJsonTransform a JSON file into output items
Extract From ODSodsTransform an ODS file into output items
Extract From PDFpdfExtract content and metadata from a PDF file
Extract From RTFrtfTransform a table in an RTF file into output items
Extract From Text FiletextExtract the content of a text file
Extract From XMLxmlExtract the content of an XML file
Extract From XLSxlsTransform an Excel XLS file into output items
Extract From XLSXxlsxTransform an Excel XLSX file into output items
Move File to Base64 StringbinaryToPropertyConvert a file into a base64-encoded string
PDF to Markdown (Advanced)pdfToMarkdownExtract PDF to structured markdown with Vision OCR fallback for scanned documents
Document to MarkdowndocumentToMarkdownConvert DOCX, XLSX, PPTX, HTML, EPUB and other documents to markdown
Image OCR + DescriptionimageOCRExtract 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)

ParameterTypeRequiredDefaultDescription
OptionscollectionNo{}Parsing options for the tabular file.
— DelimiterstringNo,Set the field delimiter for CSV parsing. (shown when Operation is csv)
— EncodingoptionsNoutf-8The 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)booleanNofalseWhether to detect and exclude the byte-order-mark from the CSV input if present. (shown when Operation is csv)
— Preserve QuotesbooleanNofalseWhether 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 RowbooleanNotrueWhether the first row of the file contains the header names. (shown when Operation is csv, html, ods, xls, xlsx)
— Include Empty CellsbooleanNofalseWhether 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 LoadnumberNo-1Stop handling records after the requested number of rows are read. Use -1 to load all rows. (shown when Operation is csv)
— RangestringNoThe 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 DatabooleanNofalseWhether to return RAW data instead of parsing it. (shown when Operation is ods, xls, xlsx, html, rtf)
— Read As StringbooleanNofalseIn 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 NamestringNoName 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 LinenumberNo0Start handling records from the requested line number. Starts at 0. (shown when Operation is csv)
— Skip Records With ErrorsfixedCollectionNo{ value: { enabled: false, maxSkippedRecords: -1 } }How to handle rows that fail to parse. (shown when Operation is csv)
— — EnabledbooleanNofalseWhether to skip records with errors when reading from file.
— — Max Skipped RecordsnumberNo-1The 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)

ParameterTypeRequiredDefaultDescription
Destination Output FieldstringYesdataThe name of the output JSON field to place the extracted data in. Supports dot notation for nested paths.
OptionscollectionNo{}Decoding options and what to keep from the input item.
— File EncodingoptionsNoutf8Specify 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 BOMbooleanNotrueWhether to strip the BOM (Byte Order Mark) from the file. (shown when Operation is fromJson, text, fromIcs, xml)
— Keep SourceoptionsNojsonWhat 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)

ParameterTypeRequiredDefaultDescription
OptionscollectionNo{}Page handling, password and source-retention settings.
— Join PagesbooleanNotrueWhether to join the text from all pages into a single string or return an array of text from each page.
— Keep SourceoptionsNojsonWhat 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 PagesnumberNo0Maximum number of pages to include. Set to 0 for all pages.
— PasswordstringNoPassword for encrypted PDF files.

PDF to Markdown / Document to Markdown / Image OCR (pdfToMarkdown, documentToMarkdown, imageOCR)

ParameterTypeRequiredDefaultDescription
Destination Output FieldstringYesdataThe name of the output JSON field to place the extracted data in. Supports dot notation for nested paths.
OptionscollectionNo{}OCR and source-retention settings.
— Enable Vision OCR FallbackbooleanNotrueFor 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)numberNo20Maximum number of pages to render for Vision OCR (scanned PDFs only). Higher values increase cost and processing time. (shown when Operation is pdfToMarkdown)
— Keep SourceoptionsNojsonWhat 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

ParameterTypeRequiredDefaultDescription
Input Binary FieldstringYesdataThe 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 ConcurrencynumberNo10Maximum 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"
}
  • text is a single joined string when Join Pages is on, and an array with one entry per page when it is off.
  • numpages is the document’s real page count even when Max Pages limited how much text was read.
  • info is the PDF’s own document-info dictionary, or null when 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.

OperationValue written to the field
fromJsonThe parsed JSON — an object or array, not a string. An empty file yields {}, and a file that is not valid JSON fails the item.
textThe decoded file contents as a string.
xmlThe decoded file contents as a string, left as XML for a downstream parser.
fromIcsThe parsed calendar as an object.
binaryToPropertyThe file as a base64-encoded string.
pdfToMarkdown, documentToMarkdown, imageOCRThe extracted text as a markdown string.

Keep Source

Keep Source controls what survives from the input item, for every operation that offers it:

ValueOutput JSONOutput binary
jsonInput fields kept, result addedThe source binary property is removed; other binary properties are kept
binaryInput fields dropped, result onlyAll input binary kept, including the source
bothInput fields kept, result addedAll 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

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes 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 xlsx or ods with 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 text with a dotted Destination Output Field so the content lands in a tidy nested structure.
  • Calendar data processing — use fromIcs and read the events out of the destination field downstream.

Choosing a PDF operation

  • pdf is local, fast and free. Use it for PDFs with a real text layer.
  • pdfToMarkdown preserves 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 csv at 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.
  • documentToMarkdown reads 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 BusyBot

Last updated . Spotted something wrong? Tell us.