Workflows
Automate document processing with triggers, steps, and integrations.
What are Workflows?
Workflows automate repetitive document tasks. Define a trigger, add processing steps, and connect integrations to create end-to-end automation.
Example workflow:
- New PDF uploaded to “Invoices” knowledge base
- Extract invoice data using “Invoice” schema
- Send Slack notification with extracted amounts
- Add to monthly report
Creating a Workflow
From the Dashboard
- Go to Workflows in the sidebar
- Click Create Workflow
- Name your workflow
- Configure trigger
- Add steps
- Enable the workflow
From a Template
Templates provide pre-built workflows for common scenarios:
| Template | Description |
|---|---|
| Invoice Processing | Extract and notify on new invoices |
| Contract Review | Parse, extract, and flag key clauses |
| Resume Screening | Extract candidate info and score |
| Document Routing | Route documents by type |
Triggers
Triggers define when a workflow runs.
Event Triggers
React to platform events:
| Event | Description |
|---|---|
document.uploaded | New document uploaded |
document.processed | Document finished processing |
extraction.completed | Extraction finished |
With filters:
{
"event": "document.uploaded",
"filters": {
"file_type": "pdf",
"knowledge_base_id": "kb-uuid"
}
}Scheduled Triggers
Run on a schedule using cron expressions:
| Schedule | Cron |
|---|---|
| Daily at 9 AM | 0 9 * * * |
| Weekdays at 9 AM | 0 9 * * 1-5 |
| Weekly on Monday | 0 9 * * 1 |
| Monthly on the 1st | 0 9 1 * * |
Manual Triggers
Run on-demand via the dashboard or API.
Webhook Triggers
Trigger from external systems via webhook URL.
Steps
Steps define what the workflow does.
Parse Step
Parse documents to extract content:
{
"type": "parse",
"config": {
"agentic": false
}
}Extract Step
Extract structured data:
{
"type": "extract",
"config": {
"schema_id": "invoice-schema"
}
}Transform Step
Transform extracted data:
{
"type": "transform",
"config": {
"expression": "data.total_amount * 1.1"
}
}Condition Step
Branch based on conditions:
{
"type": "condition",
"config": {
"condition": "data.total_amount > 10000",
"true_branch": "high_value",
"false_branch": "standard"
}
}Integration Step
Send to external services:
{
"type": "integration",
"config": {
"integration_id": "slack-uuid",
"template": "New invoice: {{invoice_number}} for ${{total_amount}}"
}
}Integrations
Connect workflows to external services.
Slack
Send notifications to Slack channels:
{
"integration_type": "slack",
"config": {
"webhook_url": "https://hooks.slack.com/...",
"channel": "#invoices"
}
}Send email notifications:
{
"integration_type": "email",
"config": {
"to": "team@company.com",
"subject": "New Document Processed",
"template": "Document {{name}} has been processed."
}
}Webhook
Call external APIs:
{
"integration_type": "webhook",
"config": {
"url": "https://api.example.com/documents",
"method": "POST",
"headers": {
"Authorization": "Bearer token"
}
}
}Template Variables
Use variables in integration messages:
| Variable | Description |
|---|---|
{{document.name}} | Document filename |
{{document.id}} | Document ID |
{{extraction.field}} | Extracted field value |
{{workflow.name}} | Workflow name |
{{trigger.timestamp}} | Trigger time |
Example:
Invoice {{invoice_number}} processed.
Vendor: {{vendor_name}}
Amount: ${{total_amount}}
Due: {{due_date}}Monitoring
Execution History
View past executions from the workflow page:
- Status (completed, failed, running)
- Duration
- Step-by-step log
- Errors and retries
Execution Log
Each execution includes a detailed log:
{
"steps": [
{
"step_id": "parse",
"status": "completed",
"duration_ms": 5000,
"output": {...}
},
{
"step_id": "extract",
"status": "completed",
"duration_ms": 3000,
"output": {...}
}
]
}Scheduling
Schedule workflows to run automatically:
- Open a workflow
- Click Schedule
- Enter cron expression
- Set timezone
- Enable
Schedule Management
- View next run time
- See last run status
- Enable/disable schedule
- Modify cron expression
Best Practices
- Start simple - Begin with one trigger, few steps
- Test manually - Run manually before enabling triggers
- Handle errors - Add error notifications
- Use conditions - Branch for different scenarios
- Monitor executions - Review logs regularly
- Version control - Document workflow changes
API Reference
See the Workflows API for programmatic access.