← All projects

Shepherd

2025 · Lead Developer · n8n · RAG · PostgreSQL · Gemini

Shepherd AI is a self-hosted email workflow agent I built for real estate teams to manage high-volume inboxes, organize client communication, and quickly retrieve important documents. The system connected to Microsoft 365 through OAuth, classified incoming emails, and stored key files in a local PostgreSQL vector database. I used n8n as the workflow automation layer to route emails, trigger classification steps, manage document ingestion, and support a RAG chatbot that allowed users to search their inbox and related files through natural language.

The goal of Shepherd AI was to help the end user query their email through a secured chatbot and retrieve important documents faster, especially during closing and filing processes where speed and organization matter. Instead of manually searching through long email threads, attachments, and client folders, the user could ask the chatbot for specific documents or context and receive relevant results pulled from the indexed database.

Shepherd AI ran successfully for eight months before I shut it down due to energy usage and time constraints. Even though the service is no longer active, the project strengthened my understanding of AI workflow automation, secure self-hosting, and practical document retrieval systems for business use cases.

Client A ReMAX Realitor (confidential)
Role Lead Developer - sole engineer
Timeline 2 months, 2025
Stack Google Gemini API, M365 API, Azure, PostgresSQL (pgvector), n8n, Email Parsing, Vector Embeddings, HTML, Metadata Tagging, OAuth 2.0
Outcome Increased email management -> more houses sold.

Workflow - Email Classification Pipeline

Shepherd AI email classification workflow in n8n

Workflow - Document Ingestion & Vector Storage

Shepherd AI document ingestion and embedding workflow in n8n