DokuBrain
Guides

Workflows

Automate document processing pipelines with the visual workflow builder.

Workflows

Workflows let you chain document processing steps into automated pipelines. Define what happens when a document arrives — classify it, extract data, run validations, send for approval, and export results.

Creating a workflow

Use the visual builder in the DokuBrain dashboard, or create workflows via the API:

Create a workflow
curl -X POST https://api.dokubrain.com/api/v1/workflows \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Invoice Processing",
    "description": "Auto-process incoming invoices",
    "steps": [
      { "type": "classify", "config": { "expectedType": "invoice" } },
      { "type": "extract", "config": { "templateId": "invoice" } },
      { "type": "validate", "config": { "rules": ["amount_positive", "date_valid"] } },
      { "type": "export", "config": { "destination": "google_sheets", "sheetId": "..." } }
    ]
  }'

Step types

StepDescription
classifyVerify document type matches expected type
extractExtract structured fields using a template
validateRun validation rules on extracted data
summarizeGenerate an AI summary
compareCompare with a reference document
approveSend for human review/approval
exportExport data to external systems
webhookSend results to a webhook URL
conditionalBranch based on extracted values

Running a workflow

Trigger a workflow run by uploading a document:

Run a workflow
curl -X POST https://api.dokubrain.com/api/v1/workflows/wf_abc123/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@invoice.pdf"

Monitoring runs

Check the status of a workflow run:

Get workflow run status
curl https://api.dokubrain.com/api/v1/workflows/wf_abc123/runs/run_xyz789 \
  -H "Authorization: Bearer YOUR_API_KEY"

Visual workflow builder

The DokuBrain dashboard includes a drag-and-drop workflow builder. Go to Workflows → New Workflow to create workflows visually.

The builder supports:

  • Drag-and-drop step ordering
  • Conditional branching
  • Parallel execution paths
  • Step configuration panels
  • Real-time run preview

On this page