
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.
- Ingestion (Pub/Sub): Gmail webhook fires immediately upon email receipt.
- State Management (Gmail Labels): The system "locks" the thread using a specific label (
processed by TRISP AI) to prevent race conditions and ensure idempotency. - 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. - 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.
- Response Generation: Gemini drafts the email using the structured data and brand voice guidelines.
- 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
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
| Metric | 1. Manual Process | 2. AI Web Apps | 3. This System |
|---|---|---|---|
| Workflow | Read PDF -> Check Cal -> Write Email | Copy Text -> Prompt Chatbot -> Paste -> Edit | Zero Touch (Fully Automated) |
| Time per Inquiry | 15-20 Minutes | 5-10 Minutes | < 30 Seconds |
| Context Switching | High (Interrupts Deep Work) | Medium (Still requires active task) | None (Runs in background) |
| Reliability | Prone to human error / fatigue | Prone to hallucinations if unchecked | Deterministic Guardrails |
| Availability Check | Manual Calendar Lookup | Manual Calendar Lookup | Real-time API Check |
| Metric | Before (No-Code/N8N) | Final (Serverless Code) |
|---|---|---|
| Architecture | Heavy Execution (Drive Download + PDF Parsing) | Lightweight (Pre-compiled Config & Logic) |
| Data Source | PDF Documents in Google Drive | TypeScript Config Files (pricing.ts) |
| Latency | Slow (File I/O + Sequential Chains) | Real-Time (< 30 Seconds) |
| Cost | Fixed 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