Phase 3: AI Document Processing & Data Extraction · 50 min · n8n · OpenAI API · LangChain
Email Parsing and Classification with LLMs
15,000 emails a day is a software problem, not a people problem.
Hiring signal: Email automation is the #1 use case companies ask for in automation interviews. Being able to describe the C.H. Robinson pattern (classification + extraction + routing) and the Experian pattern (semantic intent matching + RAG) shows you understand email automation at production scale.
What you will learn
- Use LLMs to classify incoming emails by intent (order, complaint, inquiry, support, invoice)
- Extract key fields from unstructured email bodies with LLMs
- Design routing logic: classification result → workflow selection → human queue for edge cases
- Apply the C.H. Robinson pattern: 7 minutes/email → automated classification + extraction + order creation
The Problem
C.H. Robinson, one of the largest logistics companies in the world, receives 15,000 shipment-related emails per day. Each email takes a human 7 minutes to process: read, understand the intent (load offer, tracking update, complaint, invoice), extract relevant data (BOL number, origin, destination, rate), and create the right record in their TMS. That's 1,750 hours of manual work per day.
They automated it with AI: LLMs classify each email by intent, extract structured data, and route to the appropriate workflow. The result: 5,500 orders automated per day, 600+ hours saved daily. This is the pattern every email-heavy organization needs to learn.
Email automation is the #1 use case in AI workflow automation
Every company has an inbox. Every inbox has repetitive processing. The C.H. Robinson pattern (classify → extract → route) and the Experian pattern (semantic intent matching + RAG) are the two production-proven approaches. Master these and you can automate any email-heavy process.
The Concept
The C.H. Robinson Pattern
┌──────────────────────────────────────────────────────────────┐
│ EMAIL AUTOMATION PIPELINE │
│ │
│ [Email Received] │
│ ↓ │
│ [Parse: Extract subject, body, attachments, sender] │
│ ↓ │
│ [AI: Classify Intent] │
│ "Is this a load offer, tracking update, complaint, │
│ invoice, or other?" │
│ ↓ │
│ [Switch: Route by classification] │
│ ├── Load Offer → [AI: Extract BOL, origin, dest, rate] │
│ │ → [TMS: Create order] │
│ │ → [Email: Confirm] │
│ ├── Tracking → [AI: Extract BOL, status, location] │
│ │ → [TMS: Update shipment] │
│ ├── Complaint → [AI: Extract issue, priority] │
│ │ → [Slack: Alert manager] │
│ ├── Invoice → [AI: Extract vendor, amount, lines] │
│ │ → [AP: Create invoice record] │
│ └── Other → [AI: Extract entities] │
│ → [Queue: Human review] │
└──────────────────────────────────────────────────────────────┘
The Experian Pattern: Semantic Intent + RAG
Experian automated 35% of customer emails using a different approach:
[Email] → [AI: Semantic intent matching against known intents]
→ [RAG: Retrieve relevant policy/procedure from KB]
→ [AI: Generate response using retrieved context]
→ [Confidence check: auto-send or human review]
| Pattern | Best For | Key Feature |
|---|
| C.H. Robinson | Transactional emails (orders, tracking, invoices) | Classification → extraction → system action |
| Experian | Customer service emails (questions, complaints) | Semantic matching → RAG → response generation |
Classification Categories
| Category | Example Email | Extracted Fields | Action |
|---|
| Order/Load | "Offering a load from Chicago to Dallas, $2,500" | Origin, destination, rate, equipment | Create order in TMS |
| Tracking | "BOL 123456 delivered at Dallas facility" | BOL number, status, location | Update shipment |
| Complaint | "My shipment was damaged, I want a refund" | Issue type, priority, order ref | Alert manager |
| Invoice | "Attached invoice for April freight charges" | Vendor, amount, line items | Create AP record |
| Inquiry | "What are your rates for reefer loads?" | Question type, relevant info | Auto-respond from KB |
| Other | "Happy birthday from the team!" | Entities | Human review |
An email says "Hey, following up on BOL-789012 — the driver said he's 30 minutes out from the delivery location." How should this be classified and what should be extracted?
This is a tracking update — the sender is providing a status update on an existing shipment. Extract BOL number (789012), status (en route), and ETA (30 minutes). The action would be to update the shipment status in the TMS with the new ETA. It's not a complaint (no dissatisfaction), not an inquiry (not asking a question), and not "other" (it has clear intent).
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers Build It, Use It, Ship It, Exercises, Key Terms, Common Pitfalls — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy