Skip to main content

Read the text

Stepread-textread

Reads the text inside the document, free. A scan or a photo has none, so it says the document is scanned, and an AI agent step after it can read the file itself.

At a glance​

PropertyValue
Step nameread-text
ResourceClusterStep (lumen.ai/v1alpha1)
Palette group, categoryread, files
Credits1 credit each time it succeeds
Side effectsno
Installation must providenothing

Inputs​

PropertyValue
Needsfile
Producestext
Works onitem one document at a time

Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See Documents and data.

Outputs​

A later node references an output as {nodeId.field} in text, or nodeId.field in a condition.

OutputType
textstring
scannedboolean

Settings​

Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.

SettingTypeDefaultDescription
fallbackstring"none"Fallback is what happens to a scan or a photo, which has no text inside: none (the default) passes it on with no text and scanned true, for an AI agent step to read the file itself; ocr reads it with OCR, not available yet.one of none, ocr
pagesboolean-Pages marks where each page of a PDF starts, a line [[page N]] before it, in reading order, so what reads the text after can say which page a passage is on (Lighthouse citations). Off keeps the text as it always was.

The full JSON Schema of these settings: read-text.schema.json.

Use it in a flow​

A node that runs read-text goes under spec.nodes of a Flow. Give it any id, and list the next node ids in next.

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: read-text-example
namespace: tenant-acme
spec:
displayName: "Read the text"
triggers:
- id: start
ref: {name: manual-run}
next: [read-text]
nodes:
- id: read-text
stepRef: {name: read-text}