Jemari Sapp

MS Information Systems Candidate

AI For Business Innovation

Back

Autonomous Booking System

Role: Technical Product Manager & Developer | Timeline: Oct 2025 - Present
Tech Stack: TypeScript, Vercel Serverless Functions, Google Gemini AI, Google Pub/Sub, Gmail API


Overview

A fully automated, event-driven system that handles photography inquiries instantly. By replacing a manual triage process with a serverless architecture, I reduced response times from hours to seconds and eliminated context switching, demonstrating how lightweight automation can drive tangible business value.

The Challenge

As a solo studio operator, managing inquiries became a bottleneck that penalized creative work.

  • Context Switching: Every inquiry interrupted deep work, requiring me to cross-reference calendars, pricing PDFs, and policy documents.
  • Latency: Average response time lagged significantly (often hours), allowing high-intent leads to go cold.
  • Scalability: Existing no-code solutions (n8n) were too slow (minutes to execution) and expensive to scale (~$70/mo).

The Solution

I engineered a Serverless TypeScript architecture that treats email inquiries as events. The system parses intent using LLMs, checks real-time availability, and drafts context-aware responses without human intervention.

System Architecture

The pipeline is entirely event-driven with zero idle costs, ensuring sub-second triggers.

1. Idempotency Check2. LLM Intent Extraction3. Calendar API Query4. Context-Aware Draft GenerationUses
Gmail API(Read/Write)
Gemini AI(Extraction)
Client Email
Gmail Inbox
Google Pub/Sub
Vercel Function(The Brain)
Google CalendarAPI
Gemini AI(Drafting)
Config Files(Pricing/Policies)
Arrives
Push Notification
Webhook POST
Scroll to explore →
  1. Ingestion (Pub/Sub): Gmail webhook fires immediately upon email receipt.
  2. State Management (Gmail Labels): The system "locks" the thread using a specific label (processed by TRISP AI) to prevent race conditions and ensure idempotency.
  3. Intent Extraction (Gemini AI): Raw email text is converted into structured JSON ({ name, email, session_type, preferred_date, preferred_time, location, notes }) using Gemini 3 Pro with strict schema enforcement.
  4. Business Logic:
    • Availability: Queries Google Calendar API. If busy, an algorithm calculates 3 nearest alternative slots.
    • Guardrails: TypeScript configuration files (pricing.ts, policies.ts) serve as the source of truth, preventing AI from inventing prices or policy details.
  5. Response Generation: Gemini drafts the email using the structured data and brand voice guidelines.
  6. Action: The draft is inserted into the thread for final one-click approval.

Key Technical Decisions

Sentinel Labels for State

Instead of maintaining a dedicated database (Postgres/Redis) for a simple workflow, I used Gmail Labels as a finite state machine. The system applies a 'processed by TRISP AI' label immediately upon claiming a thread, preventing race conditions in parallel webhook executions. This kept the architecture stateless and strictly free-tier.

Immediate State Claiming

The system marks threads as 'processed' before slow AI operations (not after), preventing duplicate processing when multiple webhooks fire simultaneously. This pattern ensures idempotency without database overhead.

Deterministic Guardrails

To solve the risk of "AI hallucinations" (e.g., inventing low prices), I separated concerns:

  • AI handles language and tone.
  • Code handles facts (Price, Availability, Policy). The AI is provided strict context and cannot "guess" numbers.

Interactive Demo

See the system in action. Click through the tabs to explore the flow:

Inquiry: Graduation Shoot - Studio & Campus

J
Jada Anderson
to me
Today at 9:42 AM

Hi,

I wanted to do a couple of shots in a studio and on campus. Ideal locations on campus are my college building, legacy gazebo, and the KSU sign.

For the studio shots I would like maybe a yellow or white backdrop. I am graduating with a psychology degree so maybe something that can correlate with that.

Are you available on November 12th around 2pm?

Thanks,
Jada

Impact & Results

99%
Faster
62%
Cheaper
<1%
Error Rate
Metric1. Manual Process2. AI Web Apps3. This System
WorkflowRead PDF -> Check Cal -> Write EmailCopy Text -> Prompt Chatbot -> Paste -> EditZero Touch (Fully Automated)
Time per Inquiry15-20 Minutes5-10 Minutes< 30 Seconds
Context SwitchingHigh (Interrupts Deep Work)Medium (Still requires active task)None (Runs in background)
ReliabilityProne to human error / fatigueProne to hallucinations if uncheckedDeterministic Guardrails
Availability CheckManual Calendar LookupManual Calendar LookupReal-time API Check
MetricBefore (No-Code/N8N)Final (Serverless Code)
ArchitectureHeavy Execution (Drive Download + PDF Parsing)Lightweight (Pre-compiled Config & Logic)
Data SourcePDF Documents in Google DriveTypeScript Config Files (pricing.ts)
LatencySlow (File I/O + Sequential Chains)Real-Time (< 30 Seconds)
CostFixed subscriptions ($20 to $50 per month)Over 60% reduction (serverless means no idle costs)
  • 99% faster response time vs manual process (15-20 min → < 30 sec)
  • 62% cost reduction vs No-Code platforms (~$70/mo → ~$27/mo)
  • Zero context switching — runs completely in background
  • < 1% error rate — deterministic guardrails prevent mistakes