Case Study

EchemEmail Automation and Classification System

An event-driven automation system built for Echem to classify and process high-volume regulatory emails using GCP Pub/Sub, FastAPI, and RabbitMQ—enabling real-time ingestion, ML classification, and seamless OMS delivery.

USA
Pharmaceuticals
Hero-Image

Project Detail

We built a real-time, event-driven email ingestion and classification pipeline for Echem, automating the extraction and transformation of unstructured email content and attachments using GCP Pub/Sub, FastAPI, RabbitMQ, and custom ML models—ultimately enabling structured data handoff to their Order Management System (OMS).

Client Overview

Echem is a pharmaceutical-focused organization specializing in regulatory data exchange and research workflows. Every day they handle large volumes of structured and unstructured communications, especially email-based quotes and documentation—creating a need for a fully automated ingestion and classification pipeline.

Industry

Pharmaceuticals

Project Type

Email Automation and Classification System

Technologies

FastAPI
Google Cloud Pub/Sub
RabbitMQ
MongoDB
Custom ML Classification Model
Marker (Markdown Parser)
Email Validation Logic

Major Features Delivered

Comprehensive solutions designed to enhance user experience and drive business growth.

Real-Time Ingestion

GCP Pub/Sub subscription streams new Gmail events to FastAPI.

FastAPI Webhook

Validates, parses, and persists incoming email data to MongoDB.

Asynchronous Classification

RabbitMQ-driven queues for scalable ML-based email labeling.

Document Parsing Pipeline

Marker-powered conversion of attachments into Markdown for easy downstream consumption.

OMS Integration

Decoupled delivery of structured email data into the Order Management System via RabbitMQ.

Scalable Microservices Architecture

Independently deployable services ensure high availability and future extensibility.

Challenges & Solutions

We identified key pain points and developed targeted solutions to transform the resort's digital presence.

Challenges

Real-Time Email Ingestion

Capturing each incoming Gmail message instantly and reliably, without missing or duplicating events.

Accurate Classification & Validation

Distinguishing 'Quote' emails from other correspondence and ensuring each message comes from a valid, authorized account.

Attachment Handling & Parsing

Processing diverse file types (PDFs, DOCXs, images) and converting them into clean, structured Markdown.

Asynchronous Reliability

Coordinating multiple queues (GCP Pub/Sub → FastAPI → RabbitMQ) with retry logic, back-pressure management, and health checks to prevent message loss or bottlenecks.

Multi-Service Integration

Orchestrating smooth data flow between GCP Pub/Sub, FastAPI services, the ML classification model, and the downstream OMS without tight coupling.

Solutions

GCP Pub/Sub Push Subscriptions

Leveraged Pub/Sub’s push model to deliver every new Gmail event directly to our FastAPI webhook, guaranteeing real‑time delivery.

ML-Driven Label Classification

Routed emails through a RabbitMQ queue feeding a custom ML service that validates sender accounts and accurately assigns labels.

Marker-Powered Document Parser

Integrated a Markdown-conversion model to extract text and structure from attachments, normalizing outputs into a consistent format.

Resilient Queue Orchestration

Implemented retry policies, DLQs, and health-check endpoints to ensure message durability and fault tolerance.

Modular Microservices Architecture

Decoupled each function—event ingestion, parsing, classification, and delivery—into standalone FastAPI services for scalability.

Project Snippets

Visual highlights showcasing the transformation and key features of the new website.

Projrct Snippetsechem

Ready to Build Something Amazing?

Let's discuss your project and create a custom web application that drives your business forward. Get started with a free consultation today.

Call us: +1-945-209-7691
Email: inquiry@mol-tech.us
2000 N Central Expressway, Suite 220, Plano, TX 75074, United States

Business Values Provided

The email automation system drastically improved turnaround time, accuracy, and system integration while reducing repetitive human effort.

Reduced Manual Effort

Fully automates email triage, classification, and extraction—eliminating repetitive human tasks.

Faster Turnaround

Cuts the time from email receipt to actionable data by over 70%.

Improved Accuracy

ML-driven classification and parser-based extraction minimize manual errors.

Seamless Integration

Plug-and-play compatibility with OMS and email infrastructure.

Regulatory Compliance

Structured, auditable handling of all incoming communications.

Connecting Continents, Empowering Businesses
Our branch offices ensure seamless support across the globe.
USA flagUSA
12
3
6
9
00:00
2000 N Central Expressway
Suite 220
Plano, TX 75074
United States
inquiry@mol-tech.us
+1-945-209-7691
Singapore flagSingapore
12
3
6
9
00:00
408 Joo Chiat Place
Singapore (428085)
inquiry@mol-tech.us
+65 8753 5833
Switzerland flagSwitzerland
12
3
6
9
00:00
Kirchmooshöhe 4
4800 Zofingen
inquiry@mol-tech.us
India flagIndia
12
3
6
9
00:00
5th Floor, 506,
Dwarkesh business hub
Opp. Visamo Society, Motera,
380005, Ahmedabad, Gujarat
inquiry@mol-tech.us
+91 81286 94374