Automated Email Responses with GPT-4O & Supabase Conversation Memory

Go to Workflow
0 views
Built by Lukman Lukman
Created on June 13, 2026

Description

This n8n workflow lets you delegate inbox management to an AI agent. It automatically replies to emails when a suitable response is found in your knowledge base. If no match is found, the message is forwarded to a human for review. This ensures all replies follow company guidelines and prevent misinformation or misrepresentation.

Use Case
Ideal for businesses that receive frequent inquiries about products or services and want to automate responses, freeing up time to focus on core operations.

How It Works
Polls your inbox for new incoming emails
Cleans HTML to reduce token usage and filters spam
Categorizes emails for better organization
Retrieves conversation history from Supabase (if available) to give the AI proper context
Uses the AI agent to query your FAQ database for relevant answers
Replies automatically if a suitable answer is found
Sends a placeholder email and forwards to a human if no accurate answer exists
Ingests all processed emails into Supabase to retain conversation history and improve future AI accuracy

Customization
You can connect any email provider or LLM model. The workflow can also be expanded to let the AI schedule meetings, answer availability questions, or handle other inbox tasks.

If you'd like help tailoring this workflow to your business, feel free to reach out:
Upwork Profile

Nodes Used (13)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
HTTP Request
n8n-nodes-base.httpRequest
Microsoft Outlook
n8n-nodes-base.microsoftOutlook
OpenAI
@n8n/n8n-nodes-langchain.openAi
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Postgres
n8n-nodes-base.postgres
Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
Supabase
n8n-nodes-base.supabase
Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase