Get Started
Screenshot of n8n workflow
FREE TEMPLATE
Connect Supabase Gemini Chat Support
7
Views
0
Downloads
6
Nodes
Download Template
Free
Preview Template
Utility Rating
6 / 10
Business Function
Customer Support
Automation Orchestrator
n8n
Integrations
Supabase
Google Gemini
Trigger Type
Manual trigger
Approx setup time ≈ 35 min
Need help setting up this template?
Ask in our free Futurise community
About
Community
Courses
Events
Members
Templates

How to Connect Supabase Gemini Chat Support?

Leon Petrou
FREE TEMPLATE
Connect Supabase Gemini Chat Support
7
Views
0
Downloads
6
Nodes
Download Template
Free
Preview Template
Utility Rating
6 / 10
Business Function
Customer Support
Automation Orchestrator
n8n
Integrations
Supabase
Google Gemini
Trigger Type
Manual trigger
Approximate setup time ≈ 35 minutes
Need help setting up this template?
Ask in our free Futurise community

Description

Build a chat assistant that remembers each conversation and keeps contact data clean. It stores chat history in a Supabase table and fills missing name fields automatically. Great for support teams testing WhatsApp style chats or early CRM capture.

When you click Test workflow, a Set node loads a sample session id, name, and chat text. An Agent uses Google Gemini Flash 2.0 and pulls up to 20 past messages from a Supabase Postgres chat memory using that session id. The Agent sends a reply and the memory node logs the turn to the whatsapp_messages3 table. After that, a Supabase API step finds rows where the session id matches and the name is empty, then writes the name from the input. You get context for each user and cleaner records in one run.

You will need a Supabase project with a table named whatsapp_messages3 and a Google Gemini API key. Connect the Postgres chat memory and the Supabase API credential, then set the sample inputs. Expect faster answers, less manual data entry, and tidier profiles for support, lead intake, and internal help chat pilots.

Copy link

Tools Required

Supabase
Sign up
Free: $0 / mo — unlimited API requests; 500 MB database; 5 GB bandwidth; 1 GB storage; 50,000 MAUs.
n8n
Sign up
$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.
Google Gemini
Sign up
Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

What this workflow does?

  • Manual test run to safely validate the flow before going live
  • Set node defines session_id, name, and chatInput as the starting data
  • Google Gemini Flash 2.0 generates helpful replies for each message
  • Postgres chat memory in Supabase stores and retrieves up to 20 past turns per session
  • Agent node uses a simple system message to keep responses on track
  • Supabase API update fills the name field only when it is empty for the same session

What are the benefits?

  • Reduce manual profile updates from 1 hour a day to 5 minutes by auto filling missing names
  • Give agents instant context by auto loading the last 20 messages for each session
  • Improve contact data completeness by up to 90% with conditional name updates
  • Unify AI replies and stored history by connecting Gemini with Supabase
  • Handle more concurrent chats as history scales in a database instead of flat files

How to set this up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Gemini and Supabase. See the Tools Required section above for links to create accounts with these services.
  3. In Supabase, create a project and a database. Add a table named whatsapp_messages3 with at least these columns: session_id (text) and name (text). Add other message columns as needed for your chat history.
  4. Open the node named Supabase Postgres Database. In the credentials dropdown, click Create new credential. Choose a Postgres connection and enter your Supabase host, port, database, user, and password. Save the credential.
  5. In the Supabase API update node, click the credential dropdown and Create new credential. Select Supabase API, paste your Supabase URL and service role key or anon key with write access, then save.
  6. Open the GeminiFlash2.0 node. In the credential dropdown, click Create new credential. Follow the on screen steps to add your Google Gemini API key from the Google AI Studio API page.
  7. Open Set sample Input Variables. Enter a real session_id, a display name, and a chatInput message to test. Keep session_id consistent across runs to see memory in action.
  8. Review the Sample Agent. Confirm the system message fits your tone. Make sure it is connected to the Gemini language model and the Supabase Postgres chat memory.
  9. Run the workflow with Test. Check the response in n8n, then open your Supabase table to confirm new rows were added and the name field was updated when previously empty.
  10. If the name does not update, confirm the update filters include session_id equals your test value and name is NULL. Check Supabase Row Level Security and API key permissions allow updates.
  11. To move beyond testing, replace the manual trigger with your real inbound source such as a webhook from your chat platform. Keep the same session_id logic so memory stays linked per user.

Need help or want to customize this?

Similar Templates

n8n
Customer Support
Connect Google Drive and Supabase Q and A Support
Create a chat assistant that answers questions from your documents. It loads a file from Google Drive, stores it in a Supabase vector database, and uses an AI model to give clear answers. Great for support teams, training content, or policy help. The chat starts when a message comes in. The system searches your Supabase table for the most relevant text chunks and feeds them to an AI chat model to write a helpful reply. Content is built from a Google Drive file, converted from EPUB, split into small parts, turned into embeddings, and saved in Supabase. It retrieves the top 10 matches using a custom match function. A response step formats the final text for easy output. You can also update records with upsert steps to keep the database current. Setup needs pgvector enabled in Supabase, a table with an embedding column sized for your model, and a match_documents function. Use the same OpenAI embedding model for insert, upsert, and retrieval so dimensions match. Expect faster answers, fewer manual searches, and more capacity without adding staff. Ideal for knowledge bases, course material, and product documentation.
6 views
view
n8n
Customer Support
Automate Telegram Support Memory with Supabase and OpenAI Assistants
Turn Telegram into a smart help channel that remembers each user. When someone messages your bot, their chat history is saved and reused so answers stay consistent and feel natural. Great for customer support, FAQs, and guided help without hiring more agents. Here is how it runs. A Telegram trigger catches a new message. The workflow looks up the sender in a Supabase table using their Telegram ID. If the user is new, it creates a fresh OpenAI thread and stores both the Telegram ID and the thread ID in Supabase. A merge step makes sure the right thread ID is used every time. The message is posted to the OpenAI thread, the assistant is started with a set assistant ID, the latest reply is pulled from the thread, and the answer is sent back to the same user in Telegram. This design gives true memory by keeping one thread per user. Setup needs a Telegram bot token, a Supabase project with the provided table, and an OpenAI assistant with an API key. Expect faster replies and fewer repeated questions. Teams can support many more chats at once while keeping context from one conversation to the next. Common uses include customer support, onboarding, account help, and status updates for orders or bookings.
5 views
view
n8n
Customer Support
Automate Supabase Document Q and A
Turn your file storage into a searchable chat. Team members ask a question and get answers pulled from your own documents. Great for support and operations that keep files in Supabase. The flow lists files in a Supabase bucket, compares them with a files table, and skips duplicates. New items are downloaded and routed by type. Text files go straight to processing while PDFs are extracted first. Content is split into chunks of about 500 tokens with overlap to keep context. OpenAI embeddings are created and stored in a Supabase vector store with file_id metadata. A chat trigger listens for questions and an AI agent pulls the top 8 matching chunks to answer in plain language. You need a Supabase project with storage and a vector store table, plus an OpenAI API key. Update the Supabase URLs, bucket path, and credentials in the nodes. Expect faster answers, less manual search, and scalable knowledge across many files. Use it for policy search, help desk articles, onboarding guides, and sales materials that need quick, accurate answers.
11 views
view
See More Templates

These templates were sourced from publicly available materials across the web, including n8n’s official website, YouTube and public GitHub repositories. We have consolidated and categorized them for easy search and filtering, and supplemented them with links to integrations, step-by-step setup instructions, and personalized support in the Futurise community. Content in this library is provided for education, evaluation and internal use. Users are responsible for checking and complying with the license terms with the author of the templates before commercial use or redistribution.Where an original author was identified, attribution has been provided. Some templates did not include author information. If you know who created this template, please let us know so we can add the appropriate credit and reference link. If you are the author and would like this template removed from the library, email us at info@futurise.com and we will remove it promptly.