Supabase + Bubble connection with API connector

Hey guys, Just wanted to jump in here as I really like the discussion! I also use the API connector to some actions related to Supabase, mostly when I have a scheduled action on the backend. This plugin was mainly developed so that we can have a simple plug and play option, super fast data retrieval, and all the special thing you can do only with the Javascript SDK. I’ve also added some custom features, mostly for CSV upload and Realtime: Showing User’s online status and Showing Live Cursor on screen which works with Supabase Realtime but the rest is custom code, more unique things are in progress too.

I might be wrong but if you pass a header in the API connector (which supabase expects) it won’t run from the browser, but maybe I’m incorrect, let me know if that works too!

3 Likes

Hello, I did exactly as shown by @siddharth but I am getting getting which is fully blank only two brackets are returned. My database is all set and i triple checked the api connection. Any ideas ?

Did you disabled the RLS policy?
Go to your database> RLS policy and check if it’s disabled or not. If already disabled check if your table and cells are named in all small letters.

1 Like

Thank you it’s working :smile:
I didn’t turned off the RLS policy,

Any update on this issue?

I’m testing API connections between Supabase and Bubble to use in a future project, and I’m trying your method, as in the first image.


However, it does not return any results (as shown in the second image). What am I doing wrong?

Make sure RLS policy is off in your supabase table

Hello everyone,

How can i configure an “option set” in supabase?is there an “option set” in uspabase?

Hmm, not exactly like option sent in supabase.
But you can have a new table to use their rows and columns as new option sets in bubble

1 Like

hey @gerbertdelangen,

i would like to ask why my data in supabase table is 1108 records but in bubble as i connect use api as you way only display 1000 records only…

could you help me on this problem ?

thanks dude

supabase data

Hello there,
I reason for this is because the maximum amount of rows you can pull from Supabase at once is 1000. I am using Backendless, and it has a lower limit of 100. What we need to do is learn to use pagination. When you have more than 1000 rows you will need to make two api calls, one for first 1000 and another one for the last 108. Im still trying to figure this out but i believe when you make the first api call for supabase there should be a field called “page” or something. Could you check it out? Or does someone else can give a hando on this? since i am working out this too.

@jaimeisaac

Supabase Javascript Client - Fetch data.

GET /rest/v1/table_name?range=0-999&limit=1000

range=0-999 specifies the range of records to fetch in the current request. This fetches the first 1000 records (0-indexed) and limit=1000 specifies the max number of records to fetch in a single request.

Please try and let me know if it works

If 5k records we can use

rest/v1/table_name?range=0-4999&limit=5000

Also , However due to supabase in built limit we can also use Pagination Parameters

Record 0-999
rest/v1/table_name?range=0-999&limit=1000
Record 1000-1999
rest/v1/table_name?range=1000-1999&limit=1000
Request 3: Fetch records 2000-2999
rest/v1/table_name?range=2000-2999&limit=1000
And so on

hey @siddharth

its work dude, but then still need to change setting for max row in supabase > api setting

thanks for your help

2 Likes

@siddharth What is your opnion about bubble SQL connector plugin? Can it be used to connect to supabase? would it be better than API?

Regards

Whether the SQL Connector or API Connector is better depends on your specific requirements. SQL Connector offers direct SQL database access, which can be beneficial for complex queries and data manipulation. But, using API might provide better abstraction and security, especially if you’re dealing with sensitive data.

1 Like