Skip to content

Workflows API

DAG-based document automation for Team+ subscribers.


Overview

The Workflows API enables creation and management of multi-step document processing workflows using Directed Acyclic Graphs (DAGs).

Key Features:

  • Visual Workflow Designer - Build complex workflows graphically
  • AI Processing Nodes - Automated document analysis and extraction
  • Human Approval - Inject human decision points
  • External Integration - Call external APIs and MCP tools
  • Real-time Status - Monitor workflow execution progress

Availability: Team+ tier required


Quick Start

Create a Simple Workflow

{
  "name": "Invoice Processing",
  "trigger": {
    "type": "document_upload",
    "conditions": {
      "folder_path": "/invoices/*",
      "file_types": ["pdf"]
    }
  },
  "nodes": [
    {
      "id": "extract",
      "type": "ai_extract",
      "config": {
        "document_id": "{{trigger.document_id}}",
        "extraction_schema": {
          "vendor_name": "string",
          "invoice_number": "string",
          "amount": "number",
          "due_date": "date"
        }
      }
    },
    {
      "id": "approval",
      "type": "human_approval",
      "config": {
        "assignee_type": "role",
        "assignee_value": "finance_manager",
        "title": "Approve Invoice"
      },
      "depends_on": ["extract"]
    }
  ]
}

Workflow Management

Create Workflow

POST /api/v1/dag/workflows

See full DAG API documentation

Execute Workflow

POST /api/v1/dag/workflows/{workflow_id}/execute

Request:

{
  "trigger_data": {
    "document_id": "doc_xyz789"
  },
  "priority": "high"
}


Node Types

AI Nodes

  • ai_summarize - Generate document summary
  • ai_analyze - Deep document analysis
  • ai_extract - Extract structured data
  • ai_classify - Categorize documents
  • ai_qa - Answer questions about documents

Human Nodes

  • human_approval - Approve/reject decisions
  • human_review - Review with edits
  • human_assignment - Route to users

Control Nodes

  • condition - If/else branching
  • switch - Multi-way branching
  • parallel - Parallel execution
  • join - Wait for parallel branches
  • loop - Iterate over collections

Integration Nodes

  • http_request - Call external APIs
  • mcp_tool - Execute MCP tools
  • notification - Send notifications

Complete Documentation

For full workflow documentation, see:


Next Steps

  • Upload Documents


    Trigger workflows with document uploads

    Documents API

  • Workflow Events


    Get notified of workflow status changes

    Webhooks API