AI Chatbot with Gemini, Supabase Memory, and Dynamic User Data
detail.loadingPreview
This n8n workflow powers an intelligent AI chatbot leveraging Google Gemini for natural language processing and Supabase Postgres for conversational memory. It enables dynamic updates to user profiles, ensuring personalized interactions while maintaining context over time.
About This Workflow
Unleash the power of conversational AI with this robust n8n workflow designed for building smart chatbots. It seamlessly integrates Google Gemini Flash 2.0 as the core language model for understanding and generating human-like responses. Supabase Postgres serves as the persistent memory store, allowing your AI agent to remember past conversations and maintain context across interactions. Beyond just chatting, the workflow intelligently updates user-specific details, like a user's name, directly in your Supabase database, creating a truly personalized and data-rich user experience. Ideal for developers and businesses looking to deploy scalable and intelligent conversational agents.
Key Features
- Intelligent AI Agent: Utilizes a powerful AI agent driven by Google Gemini Flash 2.0 for advanced natural language understanding and generation.
- Persistent Conversational Memory: Stores chat history in Supabase Postgres, ensuring the chatbot remembers past interactions and maintains context across sessions.
- Dynamic User Data Updates: Automatically updates additional user information (e.g., name) in your Supabase database based on interaction data, enhancing user profiles.
- Supabase Postgres Integration: Leverages Supabase for robust, scalable, and secure data storage for chat memory and user profiles.
- Customizable Context Window: Configure the AI's memory recall with a defined context window length (e.g., 20 messages) for optimal performance.
How To Use
- Connect Google Gemini: Configure the
GeminiFlash2.0node by creating a Google Palm API credential in n8n, providing your API key. - Set up Supabase Postgres: Create a Postgres credential in n8n for the
Supabase Postgres Databasenode, connecting to your Supabase instance. Ensure thewhatsapp_messages3table exists or adjust thetableNameparameter. - Configure Supabase API: Add a Supabase API credential for the
Update additional Valuesnode, enabling it to write data to your Supabase project. - Define AI Agent Behavior: Customize the
Sample Agentnode'sSystem Messageto define your chatbot's persona and rules (e.g., "You are a helpful assistant"). - Adjust Session Tracking: Ensure the
sessionKeyin theSupabase Postgres Databasenode correctly maps to your unique user session identifier (e.g.,{{ $json.session_id }}).
Apps Used
Workflow JSON
{
"id": "2be0e9e8-1880-415a-9940-1e5d973825ef",
"name": "AI Chatbot with Gemini, Supabase Memory, and Dynamic User Data",
"nodes": 24,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 2be0e9e8-1880...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.
Google Sheets to Icypeas: Automated Bulk Domain Scanning
This workflow streamlines the process of performing bulk domain scans by integrating your Google Sheets data directly with the Icypeas platform. Automate the submission of company names from your spreadsheet to Icypeas for comprehensive domain information, saving valuable time and effort.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.