See llms.txt for all machine-readable content.

Supabase and Twilio integration

Save yourself the work of writing custom integrations for Supabase and Twilio and use n8n instead. Build adaptable and scalable Data & Storage, workflows that work with your technology stack. All within a building experience you will love.

How to connect Supabase and Twilio

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Supabase and Twilio integration: Create a new workflow and add the first step

AI WhatsApp support with human handoff using Gemini, Twilio, and Supabase RAG

Quick Overview What it is: An n8n workflow that enables AI-first WhatsApp support with seamless human handoff. Why it’s unique: The AI agent answers queries using RAG (Supabase vector store + Gemini). If a human intervenes, the AI steps down. If there’s no human reply within 2 hours, the AI resumes. Channel constraints: Respects WhatsApp’s 24-hour customer care window and requires approved message templates for out-of-window messages. How It Works AI-first: Incoming WhatsApp messages are routed to an AI agent (Gemini) with knowledge grounded by a Supabase vector store. Human-in-the-loop: When a human responds in the dashboard, AI pauses for 2 hours for that conversation. Auto-resume: If no human reply within 2 hours, AI automatically resumes. Compliance: Only responds within 24 hours of the user’s last message, or via approved templates when outside this window. Architecture (At a Glance) Transport: Twilio WhatsApp; n8n http node. RAG: Supabase (Postgres + embeddings) stores knowledgebase. LLM: Google Gemini (free API key supported). Handoff: Human dashboard (GitHub project) logs and labels AI vs Human responses, and controls AI pause/resume. Prerequisites n8n (self-hosted or cloud) with public webhook access. Twilio account with a WhatsApp-enabled number. Supabase project for vector store. Google Gemini API key. Human dashboard: https://github.com/shadrack-ago/whatsapp-dashboard.git Setup Steps (n8n + Integrations) Import workflow in n8n Create new workflow → Import from JSON → Paste the provided JSON. Enable the workflow. Create credentials Twilio: Add TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_PHONE_NUMBER. Do NOT paste real secrets publicly. Gemini: Add GEMINI_API_KEY. Supabase: Add SUPABASE_URL, SUPABASE_ANON_KEY (or service role where needed), and your table/bucket names. Connect Twilio WhatsApp WhatsApp Business setup in Twilio, or Sandbox for testing. Point Twilio incoming webhook to your n8n webhook URL. Ensure approved templates for any out-of-window messaging. Set environment variables (examples) TWILIO_ACCOUNT_SID=... TWILIO_AUTH_TOKEN=... TWILIO_PHONE_NUMBER=+1... GEMINI_API_KEY=... SUPABASE_URL=... SUPABASE_ANON_KEY=... SUPABASE_TABLE=knowledge_base EMBEDDING_MODEL HUMAN_TIMEOUT_MS=7200000 (2 hours) Human-in-the-loop dashboard Follow the repo guide: https://github.com/shadrack-ago/whatsapp-dashboard.git Run the dashboard and connect it to the same conversation store used by the workflow. Verify that human responses are captured and labeled; confirm AI pause/resume logic. Supabase for RAG Create table(s) for documents and embeddings. Ingest content per this tutorial:Supabase Tutorial Confirm your n8n nodes query the vector store before calling Gemini. Gemini setup Get API key: Gemini API Set model (e.g., gemini-pro or latest available in your environment). Test Send a WhatsApp message to your Twilio number. Observe AI response. Trigger a human reply via the dashboard → confirm AI pauses for that thread. Wait 2 hours or adjust HUMAN_TIMEOUT_MS to test auto-resume. Customization Providers: You can swap Twilio for Meta’s WhatsApp Cloud API; keep the 24-hour and template rules. Tone/Policies: Adjust system prompts and fallback behaviors in the LLM node. RAG Quality: Tune chunking, TOP_K, and embedding model for better retrieval. Timeouts: Change HUMAN_TIMEOUT_MS to alter handoff duration. WhatsApp Policy Notes 24-hour window: Replies must occur within 24 hours of user’s last message; otherwise use an approved template. Templates: Create and get approval inside Twilio/Meta before sending out-of-window messages. Security & Reliability Secrets: Store all keys in n8n credentials or environment variables. Never commit secrets to repos. Logging: Use the dashboard to audit AI vs Human messages. Rate limits: Add retry/backoff nodes for Twilio and LLM calls. Troubleshooting No replies: Check Twilio webhook URL and n8n workflow is active. Policy blocks: Ensure template use outside 24-hour window. Poor answers: Improve RAG data, increase TOP_K, refine prompts. Handoff not pausing: Verify dashboard is writing the “human active” flag that the workflow reads. Links Human dashboard (Full guide): GitHub Repo Link

Popular ways to use the Supabase and Twilio integration

Build your own Supabase and Twilio integration

Create custom Supabase and Twilio workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Supabase supported actions

Twilio supported actions

Supabase and Twilio integration details

Supabase

Supabase

Supabase is an open-source Firebase alternative that provides all the backend features you need to build a product. It provides database storage, along with an easy to use authentication service.

Twilio

Twilio

Twilio is a Customer Engagement Platform that helps you engage customers, personalize your relationship with them, and make them feel privileged. Customers prefer Twilio because it empowers them with personalized campaigns, ease of use, and make their customers happy.

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQ about Supabase integrations

Need help setting up your Supabase and Twilio integration?

Discover our latest community's recommendations and join the discussions about Supabase and Twilio integration.

  • Rafael Ramos

    RAG supabase error searching for documents: 42883 operator does not exist: extensions.vector <=> extensions.vector null

    Rafael Ramos

    Describe the problem/error/question What is the error message (if any)? Hello everyone! I’m having trouble configuring the retrieval of information after the initial setup process has gone correctly. The database appea&hellip;

    Open topic
  • Malte Mattsson

    Problem with Supabase "Empty Array"

    Malte Mattsson

    Describe the problem/error/question I have two Supabase Vector Store nodes configured identically in “Retrieve Documents (As Tool for AI Agent)” mode, but one returns results while the other returns an empty array. Work&hellip;

    Open topic
  • Jeroen van Amerongen

    Supabase vector DB as a tool retrieval

    Jeroen van Amerongen

    Describe the problem/error/question Unable to retrieve from supabase vector DB node. Insert works fine, Supabase setup is all correct. Tested with meta data search and without but nothing comes back. Embeddings works fin&hellip;

    Open topic
  • Mika De Vries

    Supabase table list empty

    Mika De Vries

    Describe the problem/error/question Currently am i trying to connect supabase to n8n. I create a documents table in supabase using the guide and setup my credential for supabase with gave a succes. But i am not able to &hellip;

    Open topic
  • Sanders Röhling Immobilien

    Help: Can't connect n8n Postgres Account to my Supabase PostgreSQL database

    Sanders Röhling Immobilien

    Hi everyone, I’m currently trying to set up Postgres Chat Memory in n8n using a Supabase Postgres database, but I can’t get it to work and I’m stuck. The screenshots show what I’ve done so far. The credentials save, b&hellip;

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Trusted by teams building smarter workflows

Why

Why use n8n to integrate Supabase with Twilio

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship