Read a File as Text
Read a File as Text turns a source into plain text: it fetches a URL, reads a stored file or email attachment, or passes raw text through, extracting readable text from web pages, PDFs, office documents and spreadsheets along the way. It is the text counterpart to Read a File as Data, which answers “what is in column C”; this one answers “what does this say”. You find it on the node picker’s Transform & data shelf.
It is also the first node of the ingest pipeline that fills a knowledge base:
Ingest: Read a File as Text → Split Text → Contextualize Chunks (optional) → Embed → Knowledge Base InsertRead back: Knowledge Base Query (search) or Read Knowledge Base (read whole)The node has one input handle and one output handle.
One file or many
Section titled “One file or many”source takes a single value or a JSON array of them. An array is read in one call and produces one document per entry, which matters most for an email trigger: its attachments array is already the shape this node wants, so a mail with five attachments costs one step rather than five.
{!! json_encode($start->payload->attachments) !!}Source types
Section titled “Source types”- URL fetches the page over HTTP. Web pages go through the same reader the web research nodes use, so you get the page’s main content rather than its navigation, and documentation sites that offer a markdown version are read in that form. A PDF or Word document at a URL is extracted to text.
- Storage object reads a file from your workspace’s own storage: a file in one of your file stores, one of its versions, or an inbound email attachment. See File Details for the ways a file can be named. An email trigger hands you an attachment’s id directly:
{!! $start->payload->attachments[0]->id !!}- File path reads a file from the server’s disk. This is disabled unless the operator has configured the directories flows may read from, so on most deployments prefer the other source types.
- Raw text uses the source value as the document, unchanged.
In the node’s settings, Source picks a stored file. Type part of its path,
and the field lists the matching files of every file store in your workspace as
Store › path, the newest first, 50 at most. A picked file is saved as its
object id. For a URL, a file path, raw text, an email attachment or a file
another node produced, click Insert a value ({x}) and write it there. A
source typed in before the field became a picker stays as it was.
Readable formats
Section titled “Readable formats”For every source type but raw text, which is used exactly as it stands, these formats are read. Anything else becomes a reject.
| Format | How it is read |
|---|---|
The text layer, laid out as on the page. Indentation and the spaces that only line things up are dropped, and a wide gap between two columns becomes |, so a table or a drawing’s title block stays readable without pages of blank space. A PDF with almost no text is flagged scanned_likely in the metadata, since scans are not run through text recognition. |
|
Word (.docx) |
The document’s paragraphs. |
.doc, .rtf, .odt, .odp, .pptx, .ppt |
Converted to a PDF by the document converter that Create a PDF uses, then read as a PDF. On a deployment without the converter these come back as an unsupported_type reject that says so. |
Excel (.xlsx, .xlsm, .xls) and OpenDocument spreadsheets (.ods) |
Sheet by sheet, under a ## Sheet: <name> heading, each row as Column: value lines, so a piece of the text still says what each number was. See Formulas in a spreadsheet. |
| CSV and TSV | Each row as Column: value lines, like a spreadsheet. |
Email (.eml) |
Its From, To, Cc, Date and Subject lines, its text, and an Attachments: list naming each file with its type and size. A message forwarded inside it follows under --- Forwarded message ---, one level deep. The files themselves are named, not read; Open an Email File saves them to a store so they can be. |
| HTML, markdown, plain text, JSON and XML | As text. A markdown file’s front matter becomes its title. |
A PDF, an office document or a spreadsheet is recognised by its content rather than by the type the sender gave it, so a PDF that a mail client labels application/octet-stream is still read as a PDF.
Formulas in a spreadsheet
Section titled “Formulas in a spreadsheet”A formula cell is read as its result, not as the formula text (with Read cell details on, the formula follows the result). Excel and LibreOffice store each result in the file when they save it, and that stored result is what you get. A workbook a program generated often carries formulas with no stored result; those are worked out while reading. A result that cannot be worked out (an error, a function the reader does not know, or a workbook too large to calculate here) is left empty rather than read as 0, and the document’s metadata says so:
{ "formulas_stored": 0, "formulas_calculated": 12, "formulas_uncalculated": 1, "formula_note": "1 formula cell(s) had no stored result and could not be worked out here, so they were left empty: Totals!D9."}Opening the file in a spreadsheet application and saving it again stores every result.
What the cells look like
Section titled “What the cells look like”With Read cell details (cellDetails) on, a spreadsheet’s text also says what a person sees in it, so a model can use a legend of colours, a struck-through line or a hidden row. Each record then starts with its row in the sheet, and a cell whose look differs from a plain one has the difference in square brackets after its value:
## Sheet: 4400 glaswHidden columns: prijs/ehd (2), subtotaal (2)
Row 16 [fill #FFC000]Omschrijving: Glas 35 dB waardehoev: 79.49 (=B34-B11)subtotaal: € 20,349.70 (=B16*J16) [note by Jurjen: "m2 uit model"]
Row 23 [hidden]Omschrijving: ~~Binnendeuren~~ [color #FF0000]- A fill that every filled cell of the row shares is said once, on the row’s line.
- A number or date appears as the sheet shows it, in the workspace’s number format, with its formula in brackets after it.
- Struck-through text is between
~~. Bold, italic, underline, a text colour and a link appear in the brackets. - A sheet’s hidden columns are listed under its heading.
The option is off by default. A knowledge base wants it off: a colour in an embedded chunk is noise to a search. An agent reading a spreadsheet you attach to it always gets the details.
A workbook with more than 200,000 cells (an empty cell with formatting counts) is too large to read with its details. It is read as plain values instead, and its metadata says so with "cell_details": false and a cell_details_note.
Pages and parts of a PDF
Section titled “Pages and parts of a PDF”Three fields narrow what is read from a PDF. Any other file is read whole, whatever they say.
-
Pages (
pages) reads only the pages you list:1,2-4,last, or a combination such as1,3,6-8. A page past the end is skipped rather than refused, so1-3of a two-page file reads both pages. -
Part of the page (
region) reads only part of each selected page:Value Reads title-blockA drawing’s title block, found from its labels (drawing number, revision, date, scale, sheet and the like, in Dutch or English). When the page has none, the bottom-right corner. bottom-right200 × 140 mm in the bottom-right corner. right-stripThe rightmost 200 mm, full height. bottom-stripThe bottom 140 mm, full width. {"x": 0.6, "y": 0.7, "w": 0.4, "h": 0.3}A box as fractions of the page, measured from the top-left corner. The presets are sized in millimetres rather than as a share of the page, because a title block is the same size on an A4 and on an A0.
-
One document per page (
split) returns each page as a document of its own, with its page number and page facts in itsmetadata. A drawing set is then registered sheet by sheet, and a knowledge base can cite a page.
This is how you read a drawing’s title block as text. On a whole A1 sheet it comes last, after the dimensions and notes; region: title-block reads only the block.
When more than one page is read into one document, each page starts with a line naming it, so you and a model can tell which sheet a line came from:
--- page 2 of 12 ---…--- page 3 of 12 ---…With Part of the page set, the line names the part too: --- page 3 of 12, title-block ---. A PDF read with none of these fields set is one text with no page breaks. To keep them for a whole PDF, set Pages to all.
With Pages or Part of the page set, each document also carries pages: for every page read, its paper size, orientation, size in millimetres, rotation and whether it looks scanned. A value that does not parse, such as pages: first, fails the node with a message showing how to write it, because it is a mistake in the flow rather than a property of the file.
A stored file is read once
Section titled “A stored file is read once”What a stored file was read as (its text, its pages, a region of a page) is kept on the file. The next flow that reads the same file, or the same flow on its next run, gets the kept reading instead of reading the file again. A new version with different content is read afresh. A URL or raw text is read each time and keeps nothing.
Every read is recorded on the file: its row on the Files page shows what was read from it, and by which run and node.
Reading images
Section titled “Reading images”A photograph or a scanned page has no text to extract. Under More settings, set Read images with to a provider and pick a model, and those files are described by a vision model instead: the node sends the image and your question, and the answer becomes the document’s text. Leave the provider empty and images are rejected as unreadable, which is the default.
Read an Image is the same capability as its own node, which is the better choice when images are all you are reading: it returns one entry per image and tells you whether the model could read it. Use the field here when a batch mixes documents and pictures and you want one step.
This leg costs money and is not deterministic, unlike every other format the node reads. Ask it something specific with Image question (for example, “Transcribe any text in this image, or say what it shows”) rather than accepting a generic caption.
Configuration
Section titled “Configuration”

| Field | Type | Default | Description |
|---|---|---|---|
Source (source) | string ✦ (required) | — | The file to read — a URL, a file path, a stored file, or raw text, depending on the source type. A JSON array reads every file in it. Web pages are read up to the page limit and cut there; documents (PDF, Word, Excel) are read whole up to the document limit and come back as a reject above it. The “limits” on the output say what both are. |
Source type (sourceType) | one of url, file_path, storage, raw_text ✦ (required) |
— | How to interpret the source value: a URL to fetch, a file path to read, a storage object to read, or raw text used as-is. |
Maximum length (characters) (maxLength) | integer ✦ (optional) | — | Truncate the extracted text to this many characters; leave empty for no limit. Note that web pages are separately capped at 2 MB by the platform before this field ever applies — a very large page may already be shorter than it looks. |
Pages (pages) | string ✦ (optional) | — | For a PDF: which pages to read, e.g. 1, 2-4, last, 1,3 or all. Leave empty for the whole file as one text; with pages set, each page read starts with a ”--- page N of M ---” line. |
Part of the page (region) | string ✦ (optional) | — | For a PDF: read only part of each page — the title block, a strip, or a box. |
One document per page (split) | boolean ✦ (optional) | — | For a PDF: one document per page instead of one per file. |
Read cell details (cellDetails) | boolean ✦ (optional) | — | For a spreadsheet: also say what the cells look like (fill and font colour, bold, strikethrough, formulas, comments, links) and which rows and columns are hidden, beside the values. |
Read images with (readImagesWith) | one of openai, anthropic, gemini, ollama, mistral, groq, xai, voyageai, openrouter, typesafe, eleven, openai-compatible, soniox ✦ (optional) |
— | Read images too, by showing them to an AI model. Leave empty and an image comes back under “rejects” instead. |
Image model (imageModel) | string ✦ (optional) | — | The model that looks at images. Required when reading images, and it must be one that can see. |
Image credential (imageCredential) | string ✦ (optional) | — | The key the image reading pays with. Leave empty to use the workspace key for that provider. |
Image question (imageQuestion) | string ✦ (optional) | — | What to ask about each image. Leave empty to ask for a plain description of what it shows. |
Read recordings with (readAudioWith) | one of openai, anthropic, gemini, ollama, mistral, groq, xai, voyageai, openrouter, typesafe, eleven, openai-compatible, soniox ✦ (optional) |
— | Read recordings too, by transcribing them with a speech-to-text model. Leave empty and audio comes back under “rejects” instead. |
Recording model (audioModel) | string ✦ (optional) | — | The speech-to-text model that transcribes recordings. Required when reading audio. |
Recording credential (audioCredential) | string ✦ (optional) | — | The key the transcription pays with. Leave empty to use the workspace key for that provider. |
Fail when a file cannot be read (failOnUnreadable) | boolean ✦ (optional) | — | Fail when a file cannot be read, rather than returning the ones that could. |
Approval (requiresApproval) | one of inherit, always, never (optional) |
— | Whether a human must approve this before it runs, when an agent uses it as a tool. “Follow the agent’s approval mode” is almost always right: the agent’s mode already decides, based on what this node actually does. Override it only to pin this one node — always ask (even on Autopilot), or never ask. |
Fields marked ✦ accept expressions.
Try this node — run it once against your own workspace, with your credentials, without building a flow first.
Output
Section titled “Output”The output is always a list, even when you gave it one file:
{ "documents": [ { "source": "https://example.com/handbook.pdf", "text": "The extracted plain text...", "metadata": { "source_type": "url", "length": 18211, "title": "Employee handbook" } } ], "rejects": [], "limits": { "maxDocumentBytes": 10485760, "maxPageBytes": 2000000 }}limits reports the size limits in force on this deployment, so a flow can filter on them instead of hard-coding a number that an operator may later change.
A fixed shape is the point: a result that was an object for one file and a list for several would make every downstream step guess, and an agent reading it would branch on the wrong one.
metadata carries what extraction learned about the document: always source_type and length, plus fields like title, filename, attachment_id, or a page count where the source provides them. Split Text reads documents[*].metadata and copies it onto every chunk, so whatever is learned here reaches the knowledge base and the citations a RAG answer gives.
To reach a single document downstream, address it by position:
{!! $prev->documents[0]->text !!}With Pages or Part of the page set, a PDF’s document carries its page facts beside the text, and metadata counts the pages read (pages) and the pages the file has (pages_total):
{ "pages": [ { "page": 1, "widthPt": 2383.94, "heightPt": 1683.78, "widthMm": 841, "heightMm": 594, "paper": "A1", "orientation": "landscape", "rotation": 0, "characters": 6180, "scannedLikely": false, "region": "title-block" } ], "text": "Tekeningnr | K-201 ...", "source": "Drawings/K-201.pdf", "metadata": { "source_type": "storage", "length": 412, "pages": 1, "pages_total": 1 }}paper is an A size when the page is one, and null otherwise. With One document per page, the same facts sit in each page’s metadata instead.
Files that cannot be read
Section titled “Files that cannot be read”An unreadable file is a reject, not a failure. Each entry in rejects names the source you passed in, a reason written to be read, and a code you can branch on. The run carries on with whatever did read.
{ "rejects": [ { "source": "att_7f3c", "reason": "Cannot read logo.png: no reader handles image/png", "code": "unsupported_type" }, { "source": "att_9a21", "reason": "FAN_CATALOGUES.pdf is 13428122 bytes, over the 10485760-byte limit for documents. A partial binary cannot be read, so it is refused rather than truncated.", "code": "too_large", "bytes": 13428122 } ]}source is always the value you gave the node, never the filename the reason mentions, so you can line results up against your input with array_column. The codes are too_large, unsupported_type, extraction_failed, not_found and content_gone; bytes appears when the size was known.
A file that is over the document limit is one of these rejects. The files under the limit in the same batch are still read and returned, which matters most for the commonest use of this node: reading the attachments on an inbound email, where anyone can send you a file larger than the limit.
A URL that answers 404 Not Found or 410 Gone is a not_found reject too, with the status in the reason. Other failed answers are not rejects and fail the node: a server error or a rate limit (5xx, 429) may read on the next try, so the node is retried, and 401 or 403 means the server refused you rather than that nothing is there.
That default is deliberate, and it is the opposite of Read a File as Data’s behaviour for a bad row. An unparseable row means a broken spreadsheet, worth stopping for. An unreadable file among a customer’s attachments is routine: a logo in an email signature is not broken, it simply has no text in it, and failing there would throw away the four attachments that did read in order to report the one that did not.
Turn on Fail when a file cannot be read, under More settings, when a missing document should stop the run, such as an invoice pipeline where a skipped file means an unpaid bill.
Example
Section titled “Example”The featured template Data / ReadDocument (card: “Read a stored file, an attachment or a web page as text.”) is the one-node version: it reads a README over HTTPS with source type URL and maxLength 2000, so you can run it and read the extracted text straight out of the run. Import it from Automation → Templates.
To read an email’s attachments instead, set the source type to Storage object and the source to the whole attachments array shown above.
Limitations
Section titled “Limitations”- URL fetches pass through the platform’s outbound firewall: addresses that resolve to private or internal networks are refused, and every redirect hop is re-checked.
- Two size limits apply, by what the bytes are rather than where they come from. A web page (HTML or markdown) is read up to the page limit (2 MB by default) and cut there before
maxLengthever applies, so a very large page arrives partial. A document (PDF, Word, Excel, CSV) is read whole up to the document limit and rejected above it, from a URL, a mounted file or storage alike, because half a PDF cannot be parsed. The reject names the file, its size and the limit, and a server that declares its size is refused before the download starts. Your operator sets both; the document limit is the same as the limit on one email attachment unless they set it apart. Both come back on every result underlimits. - When a PDF cannot be read, the reject carries the PDF reader’s own reason (for example “Couldn’t read xref table (the file may be truncated or damaged)”) so a damaged or cut file is told apart from an unsupported one.
- Storage keys must sit under your own workspace’s prefix, and attachment ids resolve only within your workspace.
- An attachment record whose stored content has been pruned or expired is rejected with a message saying so.
- A PDF is read up to a page ceiling (200 pages by default) and then truncated, never refused. The metadata records
pages_truncatedand the realpages_total, so a partial document is visible in the knowledge base rather than something you have to infer. - Image reading needs a provider credential and bills per call. A scanned PDF with no text layer is not sent to the vision model; only image files are. To have a model look at a page of a PDF, use Read an Image, which renders the page first.
Related
Section titled “Related”- Read a File as Data: a file’s rows or tree rather than its text.
- Read an Image: what a picture shows, with a legibility flag.
- Split Text is the next step in the ingest pipeline.
- Web Fetch reads a page for an agent to reason about, rather than for ingestion.
- Knowledge bases explains the storage this pipeline fills.
- How to choose between searching and reading covers how agents use what you ingest.