AI Agents

Retrieve and Answer Questions from Live Data with AI

34 nodes 317 177 Automatic trigger
Download

Workflow Description

An automation that extracts data from Supabase and Notion, splits it into manageable chunks, converts them to embeddings, and stores them in a vector store. When a user submits a query via chat, it retrieves relevant information and generates accurate answers using OpenAI's language model.

How it works

  1. 1.Load live data from Supabase and Notion using document loaders
  2. 2.Split content into logical tokens and organize into batches
  3. 3.Convert text chunks to vector embeddings via OpenAI
  4. 4.Store embeddings in a Supabase vector store for fast retrieval
  5. 5.Receive and process user queries through the chat interface
  6. 6.Retrieve relevant information and generate answers using retrieval-QA chain

Use cases

  • Build an intelligent assistant that answers questions based on your organization's current databases
  • Automate customer support by instantly answering queries from internal documentation
  • Create a unified search engine across multiple data sources powered by AI

Requirements

  • Active OpenAI account with a valid API key for embeddings and chat
  • Supabase database with tables for source data and vector store storage
  • Notion workspace with pages and databases to index and query

Service Value

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

Apps Used

OpenAI Text Splitter Split In Batches LLM Chain Vector Store Chat Trigger Supabase Notion Document Default Data Loader

Details

Trigger Automatic trigger
Nodes 34
Apps 9
Views 317
Downloads 177

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

/

Embeddings OpenAI

OpenAI

#1

Token Splitter

Text Splitter Token Splitter

#2

Loop Over Items

Split In Batches

#3

Question and Answer Chain

Chain Retrieval Qa

#4

Vector Store Retriever

Retriever Vector Store

#5

OpenAI Chat Model

OpenAI

#6

When chat message received

Chat Trigger

#7

Schedule Trigger

Schedule Trigger

#8

Sticky Note

Sticky Note

#9

Limit

Limit

#10

Limit1

Limit

#11

Delete old embeddings if exist

Supabase

#12

Get page blocks

Notion

#13

Default Data Loader

Document Default Data Loader

#14

Sticky Note1

Sticky Note

#15

Input Reference

No Op

#16

Notion Trigger

Notion

#17

Get updated pages

Notion

#18

Sticky Note23

Sticky Note

#19

Sticky Note24

Sticky Note

#20

Sticky Note25

Sticky Note

#21

Sticky Note26

Sticky Note

#22

Sticky Note27

Sticky Note

#23

Sticky Note28

Sticky Note

#24

Supabase Vector Store1

Vector Store Supabase

#25

Sticky Note30

Sticky Note

#26

Sticky Note31

Sticky Note

#27

Supabase Vector Store

Vector Store Supabase

#28

Sticky Note32

Sticky Note

#29

Sticky Note29

Sticky Note

#30

Sticky Note33

Sticky Note

#31

Sticky Note34

Sticky Note

#32

Sticky Note35

Sticky Note

#33

Concatenate to single string

Summarize

#34