Supabase Plugin - Integrate Supabase into your Bubble app

Hey @kimbern

One way to implement this is to trigger workflows when the checkbox is clicked, and then call the “Update” action.

For example, let’s say you have a todos RG with:

  • Column id
  • Column completed (boolean)

You can then have two workflows triggered when the checkbox is clicked:

  • Clicked and Current row completed is true
    Call update with:
    • Filter type: “Column is equal to a value”
    • Column: id
    • Value: false

Workflow
image

Update

  • Clicked and Current row completed is false
    Call update with:
    • Filter type: “Column is equal to a value”
    • Column: id
    • Value: true

checkbox-update

Thanks Nass. Realised I had to update the RLS policy in Supabase too.

1 Like

Has anyone implemented an ‘infinite scroll’ yet and attempted to replicate the pagination effect of RGs when ‘show all items immediately’ is disabled?.

My current plan is to load X items initially, when the RG index X - 5 item ‘is_visible’ make a new call to SB and append items to the existing RG.

hi @Nass

We deployed the supabase on our own image. We are trying to display data from one table as a test. Of course, we use a plugin.

We get error 500.

We tried connecting via API, everything was fine.

But we would like to work through a plugin, since there is an assumption that this will be easier for us. What do you think the problem could be?


Hey @klyuchonline
I’ll send you a DM so we can troubleshoot your issue together.

Hi @Nass, we are facing an issue regarding the reset of passwords. We did set up the flow as indicated in your demo page ( https://supabase-editor.bubbleapps.io/version-test/reset_user_password_link) but we get a 303 error from the Supabase API.
I checked the auth component, it is indeed authenticated, but the Auth event is “INITIAL_SESSION” and not smthg related to recovery.

Could you help on us on this ?

The 303 error happens when we load the recovery page. The token indeed appears in the URL but then disappears and only leaves a “#” in the URL. The user us authenticated on the page


Hi @romain.olekhnovitch

The 303 response you’re seeing is expected behavior (it’s not an error but part of the redirection during the auth flow)

When the recovery page loads, the plugin reads and processes the token from the URL and authenticates the user. Since the user is authenticated you should be able to call the Update user action with the new password.

If you still have some doubts or need more details, please feel free to send me a DM.
Thanks!

Thanks so much for the answer, this is reassuring. The password update works perfectly well ! We are super happpy with the plugin :slight_smile:

1 Like

Hi @Nass, recently installed your plugin and its pretty awesome.

I am curious about the create a project through the management API.

We want to provide out customers with the ability to upgrade to their own DB in their selected region. I’m not sure if this can help with that in regards to setting up the DB the way I need it. I was wondering if the ‘template url’ had anything to do with that?

Also, regardless if we automate project creation or we manually do it. Can this plugin handle dynamic projects? From what I understand the API keys are project specific at the plugin page level and are not at the element or action level so I can’t pass in dynamic api keys. Am I missing anything?

Thanks!

1 Like

Hey @bkerryk
Thank you for your message!

I was wondering if the ‘template url’ had anything to do with that?

The template URL is used to create a new project from a repository. I haven’t tried it out myself, but it should work similarly to the “supabase bootstrap” command. However templates must be public, so I’m not sure if this is what you’re looking for.

(for example: supabase/examples/ai/edge-functions at master · supabase/supabase · GitHub)

Can this plugin handle dynamic projects?

This is on the roadmap but not yet implemented. I can add it to the next plugin version (v2.1.0). A new action “Set Supabase Settings” will allow you to pass project settings dynamically. ( A new server-side action “Run SQL query” will also be added )

In your case, one option could be:

  • Calling the “Create a project” action
  • Then calling the “Run SQL query” action with your “pre-defined” queries (e.g., creating tables, etc.) once the project is ready

I hope this helps!
Best

1 Like

Hello NoCodeGarden Team,

My name is Konstantin, and I am currently utilizing your Supabase plugin for my project on the Bubble platform. I have encountered a persistent issue when attempting to connect a specific Supabase database, while connections to other databases function correctly without any problems.

Error Details:

When trying to connect to the problematic database, the following error is thrown:

The plugin Supabase by Nocodegarden / element Supabase Database threw the following error: Error: Expected a string, but got a number (original data: 1)
at generate_JS_to_bubble_error (https://estkontaktcomdev.bubbleapps.io/package/run_debug_js/1555cdfec650244c85057811d4cd848daab1b713122c5942c71c096aa4a1b77a/xfalse/x29/run_debug.js:726:21450)
at Object.JS_to_bubble (https://estkontaktcomdev.bubbleapps.io/package/run_debug_js/1555cdfec650244c85057811d4cd848daab1b713122c5942c71c096aa4a1b77a/xfalse/x29/run_debug.js:727:3078) (please report this to the plugin author)

Steps I Have Taken to Resolve the Issue:

  1. Duplicating the Database: I have attempted to create copies of the problematic database multiple times, but the error persists with each copy.

  2. Using Other Databases: Connections to other Supabase databases through your plugin work flawlessly, indicating that the issue is isolated to this specific database.

  3. Verifying Data Types: I have ensured that all fields in the database have the correct data types and align with the plugin’s expected parameters.

Additional Information:

Bubble Application URL: https://estkontaktcomdev.bubbleapps.io

Date of Error Occurrence: [Please insert the date here]

Reproduction Steps:

  1. Attempt to connect the specific Supabase database using your plugin.

  2. Encounter the aforementioned error message.

Request for Assistance:

Given that other databases connect without any issues, I suspect that the error may be related to specific configurations or data within this particular database that the plugin is not handling correctly. I would greatly appreciate your assistance in:

• Analyzing the root cause of this error.

• Providing guidance or solutions to resolve the issue.

• Considering an update or patch for the plugin if the problem stems from its internal handling of certain data types.

If you require any additional information or access to my Bubble application for further diagnosis, please let me know, and I will be happy to provide it.

Thank you in advance for your prompt attention to this matter. Your plugin is integral to my project, and I am eager to resolve this issue as quickly as possible.

Best regards,

Konstantin

That sounds perfect! Thanks for the reply. Do you hire yourself out? My client and I might like to hire you for some work/advise to do with all this.

1 Like

Hey @estkontakt.com.dev
Thanks for reaching out. I’ll DM you so we can solve your issue together.
Best!

Hey @bkerryk
I’ve sent you a DM. Best!

1 Like