Email Ingestion
Overview
Automatically process documents sent via email with AI-powered classification and extraction
Email Ingestion
The Email Ingestion service allows you to process documents automatically by sending emails to dedicated addresses. Documents are classified, data is extracted using AI, and records can be created directly in NetSuite.
Key Features
- Email-Based Processing: Send documents to
invoices@yourorg.adteco.io - AI Classification: Automatically detect document types (invoices, POs, receipts, etc.)
- Multi-Model Extraction: 4-pass extraction pipeline for high accuracy
- NetSuite Integration: Create vendor bills, invoices, and expense reports automatically
- Entity Resolution: Fuzzy matching to find vendors, customers, and items
- Attachment Support: Process PDFs, images, and common document formats
How It Works
sequenceDiagram
participant Email Client
participant SES
participant S3
participant Parser
participant Classifier
participant Extractor
participant NetSuite
Email Client->>SES: Send email with attachment
SES->>S3: Store raw email
S3->>Parser: Trigger processing
Parser->>Parser: Extract attachments
Parser->>Classifier: Classify document type
Classifier->>Extractor: Route to appropriate extractor
Extractor->>Extractor: 4-pass extraction
Extractor->>NetSuite: Create record
NetSuite-->>Email Client: Confirmation emailSupported Document Types
| Document Type | NetSuite Record | Description |
|---|---|---|
| Vendor Bill | vendorbill | Invoices FROM vendors TO your company |
| Customer Invoice | invoice | Invoices FROM your company TO customers |
| Purchase Order | purchaseorder | Purchase order documents |
| Expense Report | expensereport | Employee expense receipts |
| Receipt | N/A | Simple purchase receipts |
| General Request | N/A | Emails without document attachments |
Quick Example
-
Configure your email address:
invoices@acme.adteco.io -
Forward or send documents:
- Send invoices directly from vendors
- Forward emails from your inbox
- CC the address on procurement emails
-
Documents are processed automatically:
- AI classifies the document type
- Data is extracted (vendor, amounts, line items)
- NetSuite record is created
- You receive a confirmation email
Architecture
The email ingestion pipeline consists of three core services:
Email Parser Service
Parses raw email content and extracts:
- Sender information
- Subject and body text
- Attachments (PDF, images)
- Headers and metadata
Classification Service
Uses AI to classify documents:
- Analyzes document content and email context
- Returns confidence scores
- Routes to appropriate extractor
Entity Resolver Service
Matches extracted names to NetSuite records:
- Fuzzy string matching (Levenshtein distance)
- Vendor, customer, item, employee lookup
- Configurable confidence thresholds
Getting Started
- Set up email routing - Configure your organization's email address
- Configure document types - Customize classification rules
- Connect NetSuite - Enable automatic record creation