An email-driven automation pipeline for a global food & beverage sourcing firm
The client is a 30-year global food & beverage sourcing firm handling truckload-scale purchase orders across retail, foodservice, and industrial buyers. Every purchase order, shipment document, and payment notification arrived by email — and every one was manually re-keyed into the client's accounting system across many vendor relationships. We replaced the entire manual workflow with a scheduled automation pipeline. It runs continuously today — and scaling vendor volume no longer means scaling admin headcount.

Every PO was a copy-paste job
- Purchase orders, shipment documents, and payment notifications all arrived by email
- Each one was manually re-keyed into the accounting system across many vendor relationships
- Shipment documents required manually generating warehouse labels and compliance drafts
- Scaling vendor volume meant hiring more admins
A scheduled pipeline that runs itself
- Email classifier routes every incoming message to the right handler
- Purchase orders become accounting entries automatically — including multi-location splits
- Shipment documents generate warehouse labels and rich compliance drafts on their own
- New vendors come online by editing a single config file
How we built it, stage by stage
Four stages applied to global PO automation.
We mapped every email that hit the inbox
Before writing any parsers, we sat with the admin who processed the incoming work and watched what actually happened. Every purchase order, every shipment document, every payment notification came in by email from large buyers — and each one triggered a different manual workflow. We classified every message type, documented the extract-and-copy steps, and mapped each one to an action in the client's accounting system. That map became the spec.
An email classifier, a handler per message type, one pipeline
We designed a single scheduled pipeline that polls the inbox on a fast cadence, classifies each message, and routes it to a dedicated handler. Purchase orders are booked into the accounting system. Shipment documents drive warehouse labels and rich draft emails. Payment notifications are logged to a tracker. Vendors are mapped to customer records in a single config file, with per-vendor commission handling.
A scheduled pipeline connected directly to the client's systems
We built the pipeline in a lightweight runtime with minimal dependencies. It reads the client's inbox, writes drafts back to it, and talks directly to the accounting system — no middleware in the middle, no Zapier fragility. Token refresh and retries are handled automatically. A safety cap limits each run so a surge of incoming mail can never overwhelm downstream systems — anything over the cap just carries over to the next run.
Add a vendor in minutes, not days
Because we designed the system around configuration — vendor mappings, ignored senders, email filters, commission handling — the client can add new vendors and new pipelines by editing a single file. We also shipped an internal status tracker that shows completion of every workflow step and a daily operational dashboard. When new vendors come online, the pipeline absorbs them without adding admin headcount.
A pipeline that replaces an admin, not augments one
Parsing, classification, integration, compliance — every step of the PO flow handled without human intervention.
Pipeline Orchestration
- Scheduled pipeline running on a fast cadence — new work is picked up within minutes
- Email classifier routing every incoming message to a dedicated handler
- Per-run safety cap with automatic carry-over — no emails lost, no downstream overload
- Handler registry pattern so new pipelines plug in without touching the orchestrator
- Dry-run mode with verbose logging for parser validation before going live
Email Parsing
- Purchase order handler that books orders into the accounting system automatically
- Multi-location handler that splits parent orders across shipment destinations
- Shipment document parser that updates the client's finance tracking system
- Document handler that generates warehouse labels and rich compliance draft emails
- Payment handler that logs transactions to a dedicated tracker
- Ignore list for automated reports and non-actionable senders
Accounting Integration
- Direct connection to the client's accounting system — no middleware, no Zapier fragility
- Automatic token refresh and retry on transient errors
- Dozens of vendors mapped to customer records, including vendor aliases
- Per-vendor commission handling for non-default margins
- SKU mapping for vendors with specific product catalogs
- Estimate and invoice payload builder shared across handlers
Compliance & Fulfillment
- Warehouse label generator for pallet staging
- Rich compliance draft email template with shipment data pre-filled
- Automated updates to the client's finance tracking system
- Inbox integration for reading incoming work and writing outgoing drafts
Operations & Observability
- Daily operational dashboard for the owner with payment tracking
- Automation status tracker documenting completion of every workflow step
- Structured logs for every handled email (and every ignored one)
- Configurable schedule — tunable up or down without code changes
Client name withheld by request. Operational details are anonymized but accurate — the pipeline is currently running in production on a 15-minute schedule.
What is your stack costing you?
The pipeline above replaced a Zapier-and-admin chain that was compounding monthly. Tell us what you're paying for today and we'll come back with where you could save. Or see the fuel delivery case study.
Get My Custom Audit