Best way to learn how to write APIs for Bubble?

Hello Bubblers!

Bubble newbie here. I’m a co-founder of a mobile/startup SaaS business exploring whether I can be a technical co-founder using Bubble :slight_smile:

I’m currently replicating and extending some of the desktop functions of the existing app on Bubble; exporting the data into Bubble via CSV. The natural next step is to do this automatically via an API with our database (Postgres).

Would you guys recommend any resources for learning how to build this (and more!) APIs?

I have limited coding experience, but can pick it up if that is required. Obviously any recommended no-code API creation platforms would be fantastic.

Cheers :slight_smile:

1 Like

@TobyinSaigon Hey Toby, first of all, YES. You can be a technical co-founder of a mobile/startup SaaS business using bubble. Regarding your api question, do you mean connecting Postgres to your bubble database with API?

Thanks for the reply @ada!

My question is a bit more general. Connecting Postgres using an API is definitely something I’m looking to do, but I also want to understand how to connect things without ready made APIs in the store.

My current app for example (React Native & NodeJS), curious to understand what skills I would need to do this.

@TobyinSaigon Maybe you can check this out: 10 No-Code Tools To Build APIs With | Nordic APIs |

These are a couple of no-code tools to build an API yourself. You may wanna play with them for a while to see which is better.

1 Like

Awesome thanks :slight_smile:

Hello @ada, quick followup if thats OK. I currently have a SQL database (postgres). What is the best way to get the data from that database? The Bubble Data API?

I cant see any option to do that in the data tab, or does it become a datasource for individual elements/RGs?
Thanks :slight_smile:

@TobyinSaigon I think Bubble has a native free plugin to do so. Check if “SQL database connector” helps. Here are some references:

The query from the database can be done as an action or as a data source or both.

Thank you @ada! I managed to hook up our Postgres database and get the data into a repeating group via a SQL query. Really helpful, thank you! :grinning:

Do you know if there is a way to have data passed into the Bubble database direct or it has to be a datasource for a specific element.

Thanks!

@TobyinSaigon good to know!

You can try setting up workflows with “create a new thing” and enter the fields with the data in the repeating groups.

This post explains with more details: Save repeating group to database as new records

1 Like

@ada love it! Cool workaround, I’ll give it a go :ok_hand:

You have to setup the API call, or the SQL Querie (The SQL Database Connector Plugin connects to databases and runs SQL queries from within Bubble. These queries can be triggered as actions, data sources, or both.) as Action, not Data.

  • Action can be used in a Workflow, so you can use it to create/modify any record in your database.
  • Data is assigned to a Data Source and used to populate an element.
1 Like

Got it! Thank you sir :ok_hand: