AI Agents

Automated Customer Support with AI Memory in Supabase

16 nodes 303 155 Automatic trigger
Download

Workflow Description

An intelligent automation that responds to customer inquiries using an AI agent backed by conversation history stored in Supabase. The system learns from past interactions to provide increasingly contextual and accurate responses over time.

How it works

  1. 1.Receive customer message through chat interface
  2. 2.Retrieve conversation history from Postgres database in Supabase
  3. 3.Process inquiry using AI agent powered by OpenAI
  4. 4.Store new conversation record in Supabase for future reference
  5. 5.Send intelligent response back to customer

Use cases

  • 24/7 customer support that maintains consistency using conversation history
  • Build evolving knowledge base from repeated customer interactions
  • Reduce response time for common queries

Requirements

  • Active Supabase account with configured Postgres database
  • OpenAI API key
  • Database table schema for conversation storage
  • Chat trigger properly configured

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Chat Trigger AI Agent Supabase OpenAI Postgres

Details

Trigger Automatic trigger
Nodes 16
Apps 5
Views 303
Downloads 155

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (16)

/

When chat message received

Chat Trigger

#1

AI Agent

Agent

#2

Check If Session Exists

Supabase

#3

If Session Does Exist

If

#4

Assign Path To Session

Supabase

#5

Define Path Values

Set

#6

OpenAI Chat Model

OpenAI

#7

Postgres Chat Memory

Memory Postgres Chat

#8

Sticky Note1

Sticky Note

#9

Sticky Note

Sticky Note

#10

Sticky Note2

Sticky Note

#11

Get Correct Prompt

Set

#12

Sticky Note6

Sticky Note

#13

Sticky Note8

Sticky Note

#14

Sticky Note5

Sticky Note

#15

Sticky Note3

Sticky Note

#16