My App
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 email

Supported Document Types

Document TypeNetSuite RecordDescription
Vendor BillvendorbillInvoices FROM vendors TO your company
Customer InvoiceinvoiceInvoices FROM your company TO customers
Purchase OrderpurchaseorderPurchase order documents
Expense ReportexpensereportEmployee expense receipts
ReceiptN/ASimple purchase receipts
General RequestN/AEmails without document attachments

Quick Example

  1. Configure your email address:

    invoices@acme.adteco.io
  2. Forward or send documents:

    • Send invoices directly from vendors
    • Forward emails from your inbox
    • CC the address on procurement emails
  3. 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

  1. Set up email routing - Configure your organization's email address
  2. Configure document types - Customize classification rules
  3. Connect NetSuite - Enable automatic record creation

Next Steps