Back to projects

AI Customer Support Agent with RAG

Retrieves approved company knowledge through Supabase pgvector to produce grounded support responses with confidence checks and human approval. Unclear, sensitive, or low-confidence inquiries are escalated through Slack and HubSpot, while resolved and unresolved cases are logged for traceability and knowledge-base improvement.

Build Knowledge Base from Google Drive

Build Knowledge Base from Google Drive

Scroll to zoom · Click and drag to move

Multiple workflows · Use arrows to navigate

n8nOpenAISupabasePostgreSQLpgvectorGoogle DriveGmailSlackHubSpotRAGOpenAI EmbeddingsAI AgentStructured OutputsJSON

Project Overview

This project combines a Google Drive knowledge-base workflow with a RAG-powered customer support agent. Company documents are extracted, split into searchable chunks, embedded with OpenAI, and stored in Supabase pgvector. Incoming support questions retrieve the most relevant approved content, generate a grounded response, and either send the reply through Gmail or escalate the request for human review based on confidence and inquiry type.

Problem

The operational challenge

Customer support teams often search through scattered documents before answering repetitive questions. This slows response times and can lead to incomplete, inconsistent, or unsupported answers. Pricing requests, complaints, custom-project inquiries, and questions with weak knowledge matches also require careful human review rather than an automatic response.

Solution

The connected workflow

The first n8n workflow reads approved company documents from Google Drive, extracts and chunks the content, creates OpenAI embeddings, and stores the searchable knowledge in Supabase pgvector. The support workflow receives a customer inquiry, retrieves relevant knowledge, and uses OpenAI to produce a structured answer with a confidence score. Supported high-confidence questions receive a Gmail reply, while low-confidence or sensitive inquiries are logged, added to HubSpot, and escalated to Slack for human follow-up.

Outcome

Approved knowledge only

Grounded Responses

Customer answers are generated from relevant company documents retrieved from the Supabase pgvector knowledge base.

Confidence-based routing

Human Escalation

Low-confidence, complaint, pricing, and custom-project inquiries are routed to Slack and HubSpot for review.

Connected support records

Traceable Resolution

Questions, retrieved context, replies, escalation decisions, and resolved requests are stored for review and reporting.

Documentation

Workflow outputs and records

Selected implementation screenshots created with test data. No real client or sensitive information is included.

Google Drive Knowledge Documents

HubSpot Support Tickets

Knowledge Base Source Documents

Slack Escalation Alert

Gmail Customer Reply

Gmail Support Reply

Supabase Knowledge Base Chunks

Supabase Resolved Support Request

Next Project

Client Request-to-Project Automation

View project

Clint Ivan

Cebu City, Philippines

© 2026 Clint Ivan

Built with clarity and purpose.