Back to portfolio

AI-Powered Email Automation Agent

AWS, n8n, LLM, vector DB (Qdrant), Gmail, Bedrock

End-to-end AI email agent that ingests incoming Gmail, classifies intent with an LLM, enriches threads with live customer data (Postgres/Aurora, internal HTTP APIs, Stripe, CRM), retrieves FAQ context from Qdrant (RAG with Bedrock embeddings), and uses an Email Analysis Agent on AWS Bedrock to draft replies or trigger escalation—human-in-the-loop by default (Gmail drafts, not auto-send). Orchestrated in n8n on Dockerized AWS EC2 with a modular, replaceable-node design.

What I built

01

Gmail trigger opens an n8n workflow on AWS (Docker on EC2, Docker Compose for services) that runs the full pipeline from classification to draft or escalation.

02

LLM classification splits simple vs complex paths; conditional routing sends complex cases through a data-enrichment layer instead of duplicating truth in a new database.

03

Enrichment pulls real-time context from Postgres/Aurora, internal and external HTTP APIs, Stripe (payments), CRM, and semantic FAQ retrieval from Qdrant.

04

RAG: static knowledge embedded into Qdrant; queries embedded with Bedrock; the model blends retrieved FAQs with customer-specific context for accurate, personalized wording.

05

Bedrock-backed Email Analysis Agent interprets the thread, merges retrieval + live data, and uses structured parsers for reliable downstream actions.

06

Decision layer: escalation notifies internal teams, labels mail, and emails the customer when needed; otherwise a draft is created in Gmail for human review.

07

Designed and shipped end-to-end across infrastructure (EC2, IAM, networking, Bedrock, Qdrant ingestion) and automation (n8n design, API wiring, validation).

Tech & stack

AWS EC2DockerDocker Composen8nAWS BedrockQdrantRAGPostgreSQLAmazon AuroraGmailStripe APILLM orchestration

Screenshots

n8n workflow canvas: Gmail trigger → LLM intent classification → conditional routing → enrichment (HTTP, SQL, Stripe, vector search) → Bedrock email agent → Gmail drafts, labels, and escalation branches.

AI email automation workflow (n8n): Gmail trigger, classification, enrichment, Qdrant RAG, Bedrock agent, and draft or escalation outputs
Orchestration view: from new mail through classification, API/SQL/Stripe/Qdrant enrichment, Bedrock reasoning, to drafts and escalation—modular nodes, single source of truth.