AI Agents

Automated Database Queries with Intelligent AI Agent

6 nodes 311 152 Automatic trigger
Download

Workflow Description

This template connects an AI-powered agent using Gemini to Supabase, processing natural language queries and retrieving data automatically while maintaining conversation history in PostgreSQL memory.

How it works

  1. 1.Activate the intelligent agent when receiving manual query requests
  2. 2.Process natural language inquiries using Gemini language model
  3. 3.Search Supabase database based on retrieved context and intent
  4. 4.Store conversation history and results in PostgreSQL memory layer
  5. 5.Return formatted response from the agent to user

Use cases

  • Instant answers to customer questions about stored data
  • Automated custom reporting based on natural language queries
  • Audit trail of interactions and database access for compliance

Requirements

  • Active Supabase account with PostgreSQL database instance
  • Valid API key for Gemini language model access
  • Sufficient database permissions for read and write operations on tables

Service Value

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

Apps Used

Gemini Postgres Supabase AI Agent

Details

Trigger Automatic trigger
Nodes 6
Apps 4
Views 311
Downloads 152

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 (6)

When clicking ‘Test workflow’

Manual Trigger

#1

Set sample Input Variables

Set

#2

GeminiFlash2.0

Gemini Model

#3

Supabase Postgres Database

Memory Postgres Chat

#4

Update additonal Values e.g. Name, Address ...

Supabase

#5

Sample Agent

Agent

#6