# Read the text

> 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.

Source: https://docs.go-lumen.ai/de/reference/steps/read-text

## Auf einen Blick

| Eigenschaft | Wert |
| --- | --- |
| **Schrittname** | `read-text` |
| **Ressource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palettengruppe, Kategorie** | read, files |
| **Credits** | **1** Credit bei jedem Erfolg |
| **Externe Wirkung** | nein |
| **Die Installation muss bereitstellen** | nichts |

## Eingaben

| Eigenschaft | Wert |
| --- | --- |
| **Braucht** | `file` |
| **Liefert** | `text` |
| **Arbeitet auf** | item: einem Dokument nach dem anderen |

Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe [Dokumente und Daten](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#documents-and-data).

## Ausgaben

Ein späterer Knoten verweist auf eine Ausgabe als `{nodeId.field}` in einem Text oder als `nodeId.field` in einer Bedingung.

| Ausgabe | Typ |
| --- | --- |
| `text` | string |
| `scanned` | boolean |

## Einstellungen

Wird unter `config:` im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie `{nodeId.field}` enthalten.

| Einstellung | Typ | Standardwert | Beschreibung |
| --- | --- | --- | --- |
| `fallback` | string | `"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) |
| `pages` | boolean |  | 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. |

Das vollständige JSON Schema dieser Einstellungen: [read-text.schema.json](https://docs.go-lumen.ai/schemas/steps/read-text.schema.json).

## Im Flow verwenden

Ein Knoten, der `read-text` ausführt, steht unter `spec.nodes` eines [Flow](https://docs.go-lumen.ai/de/concepts/how-flows-run.md#the-flow-as-yaml). Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.

```yaml title="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}
```
