BuildShip Logo
BuildShip Community

Chat with Supabase

This template allows you to connect an AI assistant to a Supabase database. The assistant can pull data from a table and create a new entry.

227

Report this template

Select the reason for reporting

Describe the issue in detail

Share template

Link to template

https://templates.buildship.com/template/4Ch1FRShYtU_/

Select an example

Inputs

Thread ID

table1

Message

Please generate the bill for me. Add a $10 tip and payment would be by card. Thanks

Supabase API URL

********
This is a static example using sample inputs. Remix the template to run it with your own values.

Output

Read me

📖 How to use Chat with Supabase Template

Overview

This template allows you to connect an AI assistant to a Supabase database. The assistant can pull data from a table and create a new entry.

This template uses an example Supabase with mock data for testing.

Prerequisites

  • Get your API Key and Project URL from your Supabase account. Get it from your Supabase Project API.
  • Get your Open AI API key and an assistant ID.
  • Set up a Table in Supabase. Add the name of the table and the fields necessary for your data. Click on Import data via spreadsheet

  • On the next screen select the option Paste text and copy/paste the following data

Example Data to copy/paste:

name	description	price	category	vegetarian	ingredients	ID
Aperol Spritz	A popular Italian aperitif cocktail, light and refreshing	8	Drink	YES	Aperol, prosecco, soda water	82738969-aaa7-4f72-9f6a-a1c254b4ff41
Arancini	Crispy fried risotto balls, often stuffed with mozzarella and peas	12	Starter	NO	Rice, mozzarella, tomato sauce	2aad99d9-f00c-413f-91c1-e1738b7aa7c6
Bistecca Fiorentina	A large, thick cut of T-bone steak from the Tuscany region	30	Main	NO	T-bone steak, olive oil, rosemary	fba7998b-4a5e-4dda-a2e7-824fb4f0b7df
Chianti Classico	From the heart of the Chianti region, this red wine is bold	9	Drink	YES	Sangiovese grapes	0098c6ff-8644-45ce-8ee1-0e82fe67e88c
Eggplant Parmigiana	Layers of thinly sliced eggplants, coated with tomato sauce and mozzarella	15	Vegetarian	YES	Eggplant, tomato sauce, mozzarella	66ce20c3-f833-4ecf-986b-4c08d0ecf6c1
Fettuccine Alfredo	A simple yet rich pasta dish combining butter and parmesan	13	Main	YES	Fettuccine, butter, parmesan	625de5f3-838b-4256-b8cf-178b5e1d2b74
Lasagna Bolognese	A traditional Italian lasagna made with layers of ragù and béchamel sauce	15	Main	NO	Lasagna noodles, ragù (beef sauce), béchamel	fe97fb48-c509-4195-8ecd-372c1f60abeb
Linguine with Clam Sauce	A flavorful pasta dish featuring linguine tossed with clams and garlic	18	Main	NO	Linguine, clams, garlic, white wine	fdaa0d6e-2e1d-4830-8911-baae1138cd1f
Mineral Water	From the heart of the Chianti region, this still water is pure and refreshing	9	Drink	YES	Sangiovese grapes	0098c6ff-8644-45ce-8ee1-0e82fe67e88c
Negroni	An iconic Italian cocktail, known for its bittersweet balance	10	Drink	YES	Gin, Campari, sweet vermouth	1e937e76-775e-40c9-aa18-9d9d9e3ed4a6
Panna Cotta	A smooth, creamy dessert made with cream and gelatin	6	Dessert	YES	Cream, sugar, gelatin, vanilla	cf10d507-082d-49b6-b7f5-313f4703b1d7
Penne Arrabbiata	A spicy pasta dish from Rome made with tomato sauce and chili peppers	12	Main	YES	Penne, tomato sauce, garlic, chili	fed7c69b-e287-4952-b549-cf02f74b2169
Peroni	A premium Italian lager with a crisp, refreshing taste	6	Drink	YES	Barley malt, hops	809462e9-73bc-4936-84a1-6fdf0cd0fefe
Risotto al Funghi	Creamy and aromatic risotto cooked with mushrooms and parmesan	16	Main	YES	Arborio rice, mushrooms, parmesan	839a5277-93e8-403e-ac4c-9e6b9f37d4e9
Soave Classico	A light-bodied white wine from the Verona region	10	Drink	YES	Garganega grapes	64733896-31eb-481a-8414-73620c03a9a7
Strawberry Smoothie	A creamy, refreshing smoothie made with fresh strawberries and yogurt	6	Drink	YES	Strawberries, yogurt, honey, ice	62424730-0465-4723-91d4-772e06e2fb0e
Tiramisu	A classic Italian no-bake dessert made with layers of mascarpone and coffee-soaked ladyfingers	7	Dessert	YES	Mascarpone, espresso, ladyfinger	ae2b3c84-8693-46ad-8247-69f1cb7f599a
Water (Still)	Pure, still water, served chilled for refreshment	2	Drink	YES	EMPTY	13adebeb-fa1a-44e9-bb2a-6e3250ac2fd3

✍️ How to Use

Step 1: Add your Open AI API Key and Assistant ID

Step 2: Add your Supabase Key

Step 3: Add your Supabase Project URL as a variable

Step 4: Prepare your AI Assistant by changing its actions. This assistant has an action to READ information from a table and another action to CREATE an entry in another table. Read Action: Create Action:

Step5: Test your Assistant

🔗 Resources

How to change the AI Assistant model from OpenAI to Claude, Groq, Azure.

  1. Add a new Node and search for other Assistant nodes. Add it and fill in the information such as API Key, Prompt, and Instructions.
  2. You can copy the Supabase nodes by clicking on the 3 dots. Add a new Node and you will see the option paste on the right side.
  3. You can delete the previous AI assistant Node after the actions.

Any additional information like demo links or YouTube tutorials