AI Agents

Multi-AI Agent with Supabase Database Integration

40 nodes 276 127 Automatic trigger
Download

Workflow Description

An automation that builds a sophisticated AI agent connected to Supabase, processing inquiries, storing data, and interacting via Twitter/X. Uses OpenAI and structured output parsing to deliver accurate, well-formatted responses while maintaining conversation memory.

How it works

  1. 1.Receive queries through chat interface or external triggers
  2. 2.Process requests via AI agent that queries Postgres database
  3. 3.Execute complex operations using specialized tools and conditional routing
  4. 4.Parse and structure outputs into organized formats
  5. 5.Store context and conversation memory in database for continuity
  6. 6.Publish results to Twitter/X or return to user

Use cases

  • Build an intelligent assistant that answers questions based on your company's database
  • Automate data collection from Twitter/X with classification and Supabase storage
  • Create an investigative agent that learns from past queries and improves responses

Requirements

  • Active Supabase account with PostgreSQL database
  • OpenAI API key (GPT-3.5 or newer)
  • Twitter/X account for publishing (optional)
  • Database access permissions and whitelisted servers

Service Value

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

Apps Used

Chat Trigger Postgres Twitter/X Tool Output Parser OpenAI AI Agent

Details

Trigger Automatic trigger
Nodes 40
Apps 7
Views 276
Downloads 127

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

/

When chat message received

Chat Trigger

#1

Execute SQL Query

Postgres Tool

#2

When Executed by Another Workflow

Execute Workflow Trigger

#3

query_db_tool

Tool Workflow

#4

generate_quickchart_tool

Tool Workflow

#5

Create QuickChart

HTTP Request

#6

QuickChart Object Schema

Output Parser Structured

#7

gpt-4o-mini

OpenAI

#8

gpt-4o-mini-2

OpenAI

#9

Sticky Note

Sticky Note

#10

🤖Primary Agent

Agent

#11

🤖Secondary Postgres Agent

Agent

#12

🤖Secondary QuickChart Agent

Agent

#13

🔀Tool Agent Router

Switch

#14

Table Definitions

Postgres Tool

#15

Postgres Chat Memory

Memory Postgres Chat

#16

Sticky Note1

Sticky Note

#17

Sticky Note2

Sticky Note

#18

Sticky Note3

Sticky Note

#19

Sticky Note4

Sticky Note

#20

Sticky Note5

Sticky Note

#21

Sticky Note6

Sticky Note

#22

Sticky Note7

Sticky Note

#23

Sticky Note8

Sticky Note

#24

Sticky Note9

Sticky Note

#25

Sticky Note10

Sticky Note

#26

Sticky Note11

Sticky Note

#27

Sticky Note12

Sticky Note

#28

Sticky Note13

Sticky Note

#29

Sticky Note15

Sticky Note

#30

Final QuickChart URL

Set

#31

QuickChart GET URL

Set

#32

Sticky Note14

Sticky Note

#33

Sticky Note16

Sticky Note

#34

Sticky Note17

Sticky Note

#35

Sticky Note19

Sticky Note

#36

DB Schema and Tables

Postgres Tool

#37

gpt-40-mini-1

OpenAI

#38

Sticky Note18

Sticky Note

#39

Sticky Note20

Sticky Note

#40