Supabase Plugin - Integrate Supabase into your Bubble app

Yes here is the setup i have on my database:
image
image
image

and here is what I try to retrieve:

image

but it gives me blank or 0

Best regards

Hi @valere.taravella
Thank you for the details. The count is retrieved by adding a specific header to the request and I saw an issue in this particular case where some browser extensions block certain headers.

Would you mind trying with another browser?

Hello @Nass,

I was using firefox, just tried Chrome and same results.

Best regards

Hi @Nass,
I am having an issue with RPC. It appears that Bubble does not wait for it to finish before moving to the next step. So, I create a custom event that returns the object of the RPC. That custom event is then called when I click a group element, and the result of the custom event is needed in the next step. Thus the need to wait for the RPC to finish. However, when I debug, the custom event is returning an empty object from the RPC. What is more weird is that when I inspect the RPC object in Bubble, it shows the expected object nicely. In summary, the custom event returns empty, but bedugging shows the expected result stored in the RPC object, and I think what’s happening is that he RPC is taking a little long to complete and Bubble moves on to the next steps and returns the empty object. But after a few more seconds, the RPC competes and gets the data normally. But I could not figure out how to make Bubble wait for the RPC to be complete. Do you have any suggestions to fix this? Thanks!

BTW: After testing a little more, the issue only occurs the first time I click the group. From second click and beyond it works perfectly even if I click a different row in the repeating group which means, the parameter of the RPC changes.

Hey @flaviovs

Could you please try using the “RPC has changed” event? The RPC results should always be available after this event.

image

Just to let you know, in the next plugin version:

  • This event is renamed to “Call success”
  • You’ll be able to specify the return type of the RPC, so there’s no need to format the results as a JSON object anymore

image

I tried it before. But I just found the issue: The issue was because the RPC element was inside a hidden group. Once I moved the RPC out of the hidden group, it worked as expected. Sorry I did not notice this simple detail earlier.

1 Like

Hi,
I’m excited to let you know that plugin v2 is just about ready to go live!

:rotating_light: Before you upgrade to this new version, please be aware that these two components have been removed:

Data container
The data container component has been removed due to maintenance challenges and occasional synchronization issues with Bubble.

I recommend using Bubble’s native features, such as reusables and exposing data through custom states on reusables. If this solution doesn’t fit your needs, feel free to drop me a DM.

Using reusables: https://supabase-editor.bubbleapps.io/version-test/structuring_app

Admin component
The admin component has been fully replaced by server-side actions, offering much more flexibility.

If you need any assistance with the upgrade, please don’t hesitate to contact me.


I’ll share the full changelog soon, but here are a few new features:

Database

  • New actions for managing realtime subscriptions giving you more control over the database realtime channels.
  • Added “Referenced table” field for sorting through embedded table fields.
  • New field “Convert to null” for handling empty payload values.

Auth

  • A new event “Supabase is loaded” has been added. This event triggers only once on page load when the authentication states are fully available (Logged-in, email, etc).
  • Multi-factor authentication (MFA) actions for enrollment and verification.

Custom auth

  • Allows you to grant your Bubble users access to your data in Supabase, so you can keep your users on Bubble while securing access to your database tables. You can use the “Generate JWT” action to create tokens for authentication.


Uploader

  • New field to set custom metadata for uploaded files.
  • Image compression support.

image


Storage

  • Create signed URLs, retrieve public URLs, and download files in bulk.
  • Option to create a Zip archive while downloading files.

RPC

  • The RPC component now supports multiple types, allowing you to return different types of results from your RPC functions.

image


Since this is a major release there might be a few issues.
If you run into any, please let me know and I’ll make sure to fix them as soon as I can.
Best!

1 Like

Wondering if anyone can help. I need to create a recursive workflow that iterates through a list of things, adding each one to ‘add to bulk’ ready for them to be uploaded to a supabase database.
The issue I’m having is - how do I add the step of ‘add to bulk’ for the recursion given backend workflows do not allow you to add element actions?

Hi @kimbern
One way to implement this is to use the Simple looper plugin.

You can then:

  • Add the Simple looper element to your page
  • Run the “Start looping” action in a workflow

image

  • Then start a workflow triggered by this event:
    image

On this workflow, you can:

  • Call the “Add bulk data” action
  • Call the “Run next iteration” action

image

  • Call the “Finish looping” action

image

Finally, you can call the insert action using the bulk data as payload

image

The complete workflow:
image

Best!

1 Like

Hi, @Nass

In our project on bubble we want to build a database on supabase and, of course, choose your plugin for quick setup and further management.
The only thing is that our supabase database will be deployed on its own server.

Can you tell me if the plugin will work correctly in this case? Will there be any limitations in using the plugin?

Hi @klyuchonline,
While I don’t have specific tests with self-hosted Supabase instance this should work properly.

If you run into any issues, just send me a DM, and we’ll figure it out together.

1 Like

Brilliant. Thanks so much Nass. Sorted!

1 Like