# Extract file content (digest)

Parse stored files (PDF, DOCX, …) into text segments through the document extraction.

## When to use it

Turn stored files into text segments. Supply file references from the chosen storage connection, not paths to files on your own computer. Read extraction warnings and inspect the original when a source contains scans, complex tables, or unusual formatting.

## Add and configure

1. Add **Extract file content (digest)** from the workflow step picker.
2. Give the step a recognisable name and connect its required inputs.
3. Set the options below. Nested names identify fields within an object or a list item.
4. Validate the recipe, inspect the test result, then run it on the intended data.

The step identifier used in the editor’s code view is `digest_extract`.

## Settings

| Setting | Accepted value | Required | Default | What it controls |
| --- | --- | --- | --- | --- |
| Exclude Prefixes (`exclude_prefixes`) | list of string | No | Not specified | Relative key prefixes to skip, matched after the source prefix. For example, .versions/ excludes a version-artifact subtree. Matching files are not read, extracted, or emitted. An empty list excludes nothing. |
| Ignore Input Records (`ignore_input_records`) | boolean | No | false | Ignore upstream/trigger-injected object_keys and always process the FULL prefix listing (config.object_keys still wins when set). Required for event-triggered full rebuilds: an on_file_added trigger injects only the new file's key, which would otherwise produce a partial output over just that file. |
| Object Keys (`object_keys`) | list of string | No | Not specified | Explicit keys to parse. Empty = all under prefix. |
| On File Error (`on_file_error`) | "continue" / "fail" | No | "continue" | Permanent per-file failure policy: 'continue' emits a document_error record and moves on; 'fail' raises on the first failed file. |
| Poll Interval Seconds (`poll_interval_seconds`) | number; greater than 0 | No | 2.0 | Initial status-poll interval; backs off ×1.5 per poll, capped at 15 s. |
| Poll Timeout Seconds (`poll_timeout_seconds`) | number; greater than 0 | No | 240.0 | Per-file deadline for the document to reach a terminal status. Exceeding it raises (transient) so the runner's retry policy applies. |
| Prefix (`prefix`) | string | No | "" | Key prefix filter when listing the source store. |
| Record Type (`record_type`) | string | No | "document_segment" | record_type tag on each emitted segment record. |
| Endpoint (`source`) | object | Yes | Not specified | Object-store connection to read files from. |
| Catalog Slug (`source.catalog_slug`) | string or null | No | null | Catalog slug — mirrored for FE convenience (icon/label resolution). |
| Connection Id (`source.connection_id`) | string; format uuid or null | No | null | UUID of the Connection (integration row). |
| Display Name (`source.display_name`) | string or null | No | null | Human-readable label — the connection's display_name resolved server-side. |
| EndpointKind (`source.kind`) | "connection" | No | "connection" | Source location type. Select the supported source and provide its corresponding connection or app location. |
| Transfer (`transfer`) | "auto" / "by_reference" / "multipart" | No | "auto" | How stored files are supplied for extraction. auto uses a source reference only when an input record identifies both the object and this step’s source connection; explicit object_keys use file transfer. by_reference requests reference access for each file. multipart always transfers the file. If reference access is unavailable, processing falls back to file transfer for that file and the remaining files. |

## Inputs and outputs

| Direction | Port | Content | Required | Multiple records |
| --- | --- | --- | --- | --- |
| Inputs | `in` | files | Yes | Yes |
| Outputs | `out` | records | Yes | Yes |

## Effects, testing, and recovery

Writes information inside Strive.

The declared preview behaviour is to skip this step. Configuration can affect preview behaviour; HTTP GET is a notable exception. Read [dry runs](/docs/workflows/dry-runs) before using a preview with live connections.

Duplicate prevention uses content identity. Do not assume that manually repeating the step is free of repeated effects.

Batch processing is supported; the declared default slice is 1 records. Inspect completed slices before repeating a partial delivery.

## Example: Parse every file under a prefix of the platform store

Step settings:

```json
{
  "prefix": "invoices/2026/",
  "source": {
    "catalog_slug": "platform_store",
    "connection_id": "33333333-3333-4333-8333-333333333333"
  }
}
```

## Example: Rebuild an App's documents, skipping its version history, failing fast

Step settings:

```json
{
  "exclude_prefixes": [
    ".versions/"
  ],
  "ignore_input_records": true,
  "on_file_error": "fail",
  "prefix": "apps/expense-reports/0f4e8c2a-5b1d-4f6e-9a3c-7d2e1b0c9a8f/",
  "source": {
    "catalog_slug": "platform_store",
    "connection_id": "33333333-3333-4333-8333-333333333333"
  }
}
```

## Example: Let digest read each file from the store itself (by reference)

Step settings:

```json
{
  "prefix": "invoices/2026/",
  "source": {
    "catalog_slug": "platform_store",
    "connection_id": "33333333-3333-4333-8333-333333333333"
  },
  "transfer": "by_reference"
}
```

## Check the result

Inspect the selected run’s status, counts, errors, and output records. An empty collection can be a valid result, and a completed step can contain per-record failures where the step defines that behaviour. Check the next step’s expected record shape before publishing or delivering the result.
