Document Pipelines
Automate document processing with intelligent AI-powered pipelines.
Availability: Pro, Team, Enterprise tiers
What are Document Pipelines?
Document Pipelines are automated workflows that process documents when they’re uploaded or on a schedule. Pipelines chain together AI operations to classify, extract data, route documents, and notify your team automatically.
Think of pipelines as: Automated assistants that handle repetitive document tasks 24/7.
Pipeline Components
Triggers
What starts the pipeline:
| Trigger | Description | Example |
|---|---|---|
| On Upload | Runs when documents are uploaded | Process invoices immediately |
| Scheduled | Runs on a schedule | Daily compliance scan |
| Manual | Run on-demand | One-time batch processing |
| Folder-Based | Upload to specific folder | Finance folder triggers invoice pipeline |
Actions
What the pipeline does:
| Action | Description | Credits |
|---|---|---|
| Classify | Identify document type | 0.5 |
| Extract | Pull key data (amounts, dates, names) | 1.0 |
| Summarize | Generate document summary | 1.5 |
| Tag | Apply intelligent tags | 0.5 |
| Route | Move to appropriate folder | 0 |
| Notify | Alert team members | 0 |
| Export | Generate report | 3.0 |
Conditions
Add logic to your pipeline:
- If document type is Invoice → Extract financial data
- If amount > $10,000 → Flag for review
- If contains PII → Apply security tag
Common Pipeline Templates
Invoice Processing Pipeline
Trigger: On Upload to /Invoices
1. Classify document (confirm it's an invoice)
2. Extract: vendor, amount, due date, invoice number
3. Route to /Invoices/{vendor}/{year}
4. If amount > $5000: Notify finance@company.com
5. Tag with: invoice, {vendor}, {year}
Contract Review Pipeline
Trigger: On Upload to /Contracts
1. Classify contract type (NDA, MSA, SOW, etc.)
2. Extract: parties, effective date, term, value
3. Check for: auto-renewal, non-compete, liability caps
4. Tag with extracted metadata
5. If missing signatures: Notify legal@company.com
Compliance Check Pipeline
Trigger: Scheduled (daily at 2am)
1. Scan all documents uploaded in last 24h
2. Check for: SSN, credit cards, medical info
3. If PII found: Apply "Contains PII" tag
4. Generate daily compliance report
5. Notify compliance@company.com
Creating a Pipeline
Via the UI
- Navigate to Actions > Pipelines
- Click “New Pipeline”
- Select a template or start from scratch
- Configure trigger, actions, and conditions
- Test with a sample document
- Activate the pipeline
Via API
curl -X POST https://api.archivus.app/api/v1/pipelines \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoice Processing",
"trigger": {
"type": "upload",
"folder_id": "folder_invoices"
},
"steps": [
{
"action": "classify",
"config": {"expected_type": "invoice"}
},
{
"action": "extract",
"config": {"fields": ["vendor", "amount", "due_date"]}
},
{
"action": "route",
"config": {"pattern": "/Invoices/{vendor}/{year}"}
}
],
"active": true
}'
Pipeline Execution
Processing Flow
- Document uploaded → Trigger fires
- Pipeline queued → Added to background processing queue
- Steps execute → Each action runs in sequence
- Conditions evaluated → Branch based on results
- Complete → Results logged, notifications sent
Monitoring
View pipeline activity in Actions > Pipelines > Activity Log:
- Execution history with timestamps
- Success/failure status for each step
- Credit usage per execution
- Error details for debugging
Error Handling
Pipelines handle errors gracefully:
- Retry - Transient failures retry 3 times
- Skip - Failed optional steps can be skipped
- Stop - Critical failures stop the pipeline
- Notify - Errors can trigger notifications
Credit Usage
Pipelines deduct AI credits based on actions used:
| Action | Credits per Document |
|---|---|
| Classify | 0.5 |
| Extract | 1.0 |
| Summarize | 1.5 |
| Tag | 0.5 |
| Route | 0 (free) |
| Notify | 0 (free) |
| Export Report | 3.0 |
Example: Invoice Processing pipeline with classify + extract + tag = 2.0 credits per document
Best Practices
Pipeline Design
- Start simple - Begin with 2-3 actions, add complexity later
- Test thoroughly - Use sample documents before activating
- Use conditions - Don’t process everything the same way
- Monitor costs - Track credit usage and optimize
Folder Organization
Organize folders for efficient pipeline triggers:
/Inbox
/Invoices → Invoice pipeline
/Contracts → Contract pipeline
/HR → HR document pipeline
/Processed → Pipeline output destination
Notification Strategy
- High-value items - Notify immediately (large invoices, contracts)
- Daily digest - Batch low-priority notifications
- Errors only - Alert on failures, not successes
API Reference
Create Pipeline
POST /api/v1/pipelines
List Pipelines
GET /api/v1/pipelines
Get Pipeline
GET /api/v1/pipelines/:id
Update Pipeline
PATCH /api/v1/pipelines/:id
Delete Pipeline
DELETE /api/v1/pipelines/:id
Execute Pipeline Manually
POST /api/v1/pipelines/:id/execute
Get Execution History
GET /api/v1/pipelines/:id/executions
Get Pipeline Templates
GET /api/v1/pipelines/templates
Limitations
| Tier | Active Pipelines | Executions/Month |
|---|---|---|
| Pro | 5 | 500 |
| Team | 20 | 5,000 |
| Enterprise | Unlimited | Unlimited |
FAQ
Q: Can pipelines process existing documents? A: Yes! Use the Manual trigger or “Reprocess” button to run pipelines on existing documents.
Q: What happens if I run out of credits mid-pipeline? A: The pipeline pauses. You can resume after adding credits or the next billing cycle.
Q: Can I chain multiple pipelines? A: Not directly, but a pipeline’s “Route” action can move documents to a folder with another pipeline trigger.
Q: Are pipeline executions logged for audit? A: Yes. Team and Enterprise tiers have full audit logging of all pipeline activity.
Q: Can I duplicate a pipeline? A: Yes. Use “Duplicate” in the pipeline menu to create a copy for modification.
Need help setting up a pipeline? Ask Archie: “Help me create an invoice processing pipeline”