> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tableflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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

<Steps>
  <Step title="Get Available Flows">
    List available flows using the [flows endpoint](/api-reference/get-flows)
  </Step>

  <Step title="Run Flow">
    Execute a flow with your documents using the [run flow endpoint](/api-reference/run-flow)
  </Step>

  <Step title="Monitor Progress">
    Check flow execution status using the [flow run endpoint](/api-reference/get-flow-run)
  </Step>

  <Step title="Access Results">
    Retrieve extraction IDs and results from the completed flow run
  </Step>
</Steps>

## Flow Run Status

Flow runs progress through these status states:

* `processing` - The flow is currently executing
* `review` - The flow is paused pending human review
* `completed` - All flow steps completed successfully
* `failed` - 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 successfully
* `flow.run.failed` - Fired when a flow run fails

The webhook payload includes flow metadata and execution details.

Learn more in the [webhooks documentation](/webhooks).

## 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](/api-reference/get-flows) in your workspace
* [View all flow runs](/api-reference/get-flow-runs) across your workspace
* [View runs for a specific flow](/api-reference/get-flow-runs-by-flow)
* [Run a flow](/api-reference/run-flow) with your documents
* [Check flow run status](/api-reference/get-flow-run) and results
