← Back to Portfolio

Technical Architecture: NovaGlow AI

Customer Support Agent Walkthrough

A detailed system analysis of the n8n automation and Supabase pgvector RAG loops.

01 — End-to-End Support Agent Workflow

This workflow handles inbound emails, classifies content, retrieves skincare guidelines via similarity searches, drafts automated brand responses, and posts notifications to the support team's Slack channel.

NovaGlow End-to-End Workflow
  • Node 1: New Support Email Received (Gmail Trigger)
    Ingests incoming user messages via Gmail API hooks, parsing raw text, metadata, and attachment references.
  • Node 2: Classify Email as CS / NOT_CS
    An OpenAI routing node classifies the request intent, analyzing whether it relates to product guidelines, orders, or spam.
  • Node 3: Route Customer Support Emails
    A conditional routing switch filters spam out and passes valid customer queries directly to the drafting loop.
  • Node 4: Draft Policy-Based Reply & Search Knowledge Base
    Queries the vector base using similarity match thresholds. If a matching skincare guideline or policy chunk is found, OpenAI drafts the brand response.
  • Node 7: Create Gmail Draft
    Saves the brand-grounded response directly as a draft inside the support team's inbox, ready for instant review.
  • Node 8: Notify Slack Review Channel
    Pushes an interactive notification card with the original query, drafted reply, and approval links directly to the review team in Slack.

02 — Knowledge Base Upload & Vectorization

This secondary workflow manages the ingestion and embedding of raw skincare documents and policy texts, storing the result in the Supabase Vector Database.

NovaGlow Policy Upload to Supabase
  • Step 1: Ingestion Trigger
    Triggers manually or via file additions inside n8n to ingest new brand document versions.
  • Step 2: Policy Chunk Parsing
    Chunks the raw policy manuals into structured blocks to prevent context limit errors and maintain clean embeddings.
  • Step 3: OpenAI Embeddings & Vector Store
    Embeds the text blocks via `text-embedding-3-small` and populates the Supabase Vector Store database (`novaglow-ai-support`).