Flows API
Orchestrate complex document processing workflows
The Flows API enables you to run pre-configured workflows that combine multiple document processing steps. Flows can include extraction, reconciliation, verification, and review steps to create end-to-end document processing pipelines.
Key Features
- Multi-step workflows: Chain together multiple processing steps
- Extraction steps: Extract data from one or multiple documents
- Reconciliation: Compare and match data between documents
- Verification: Validate extracted data against business rules
- Review steps: Add human-in-the-loop approval processes
- Rerun capability: Automatically retry failed extractions
Common Use Cases
- Purchase order to invoice matching
- Multi-document reconciliation workflows
- Document verification with automatic reprocessing
- Human review and approval processes
- Complex data validation pipelines
Flow Execution Workflow
Get Available Flows
List available flows using the flows endpoint
Run Flow
Execute a flow with your documents using the run flow endpoint
Monitor Progress
Check flow execution status using the flow run endpoint
Access Results
Retrieve extraction IDs and results from the completed flow run
Flow Run Status
Flow runs progress through these status states:
processing
- The flow is currently executingreview
- The flow is paused pending human reviewcompleted
- All flow steps completed successfullyfailed
- The flow failed (check the error field)
Webhooks
You can receive real-time notifications when flow runs complete or fail. The webhook events are:
flow.run.completed
- Fired when a flow run completes successfullyflow.run.failed
- Fired when a flow run fails
The webhook payload includes flow metadata and execution details.
Learn more in the webhooks documentation.
Flow Components
Extraction Steps
Extract data from uploaded documents using AI-powered templates.
Reconciliation Steps
Compare and match data between multiple extractions (e.g., PO to invoice matching).
Verification Steps
Validate extracted data against business rules with automatic rerun capability.
Review Steps
Pause the flow for human review and approval before continuing.
Next Steps
- List available flows in your workspace
- View all flow runs across your workspace
- View runs for a specific flow
- Run a flow with your documents
- Check flow run status and results