Skip to main content
Flows are the foundation of document processing in Doclo. A flow is a pipeline of nodes that transform documents step by step, from raw input to structured output.

What is a Flow?

A flow connects processing nodes in sequence:
Each step receives the output of the previous step. The flow handles data transformation, error propagation, and metrics collection automatically.

Core Concepts

Steps

Steps are sequential processing stages:

Conditional Routing

Route documents to different nodes based on data:

Parallel Processing (forEach)

Process arrays of items in parallel:

Flow Result

Every flow returns a FlowResult:
Access individual step results via artifacts:

Validation

Flows validate configuration before execution:
The validator checks for:
  • Missing or invalid nodes
  • Duplicate step IDs
  • Type compatibility between connected steps
  • Efficiency anti-patterns

Input Formats

Flows accept multiple input formats:

Progress Callbacks

Monitor flow execution with callbacks:

Observability

Add hooks for monitoring and tracing:

Common Patterns

Basic Extraction

VLM Direct (No OCR)

Multi-Document Processing

Conditional Schema Selection

Next Steps

Creating Flows

Detailed guide to building custom flows

Flow Registry

Register and reuse flows

Pre-built Flows

Ready-to-use flow templates

Nodes Reference

Available processing nodes