/bubble-tutorials

How to connect Bubble to an external database

Learn how to connect Bubble to an external database with a simple, clear guide that improves performance and expands your app’s capabilities.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a Free Consultation

How to connect Bubble to an external database

The simplest and most reliable way to connect Bubble to an external database is to treat that external database as an API and use Bubble’s API Connector plugin. Bubble cannot connect directly to a SQL database the way backend languages do, so the external database must expose an API endpoint (REST) that Bubble can call to read or write data.

 

What this really means

 

You cannot plug Bubble directly into MySQL/PostgreSQL. Instead, the external system must provide an API layer (for example: Supabase REST API, Xano, Hasura, custom Node/Express API, or any service that exposes HTTPS endpoints). Bubble then uses API Connector to send or receive data through those endpoints.

 

How to set it up in Bubble

 

  • Install the API Connector plugin from the Plugins tab.
  • Create a new API and define at least one call (GET for reading, POST/PUT/PATCH for writing).
  • Add authentication if required (Bearer Token, API Key, etc.).
  • Initialize the call so Bubble understands the returned JSON structure.
  • Use the API call in workflows or as a data source for repeating groups.

 

Example Using a REST Database API (Supabase)

 

This example shows how Bubble retrieves rows from an external table via REST.

// GET rows from Supabase table  
GET https://your-project.supabase.co/rest/v1/users?select=*

// Headers  
apikey: YOUR_PUBLIC_ANON_KEY  
Authorization: Bearer YOUR_PUBLIC_ANON_KEY  

You paste this into the API Connector exactly as shown: method GET, URL above, and the headers section filled in. After clicking “Initialize call”, Bubble parses the JSON and you can use the response as dynamic data.

 

How writing works

 

To insert data, you use POST instead of GET.

POST https://your-project.supabase.co/rest/v1/users

// Headers  
apikey: YOUR_PUBLIC_ANON_KEY  
Authorization: Bearer YOUR_PUBLIC_ANON_KEY  
Content-Type: application/json  

// Body  
{  
  "email": "[email protected]",  
  "name": "John"  
}

You run this call inside a workflow action like “Plugins → Call API…”.

 

If your external DB has no API yet

 

  • Create a small REST API using Node, Python, or PHP.
  • Expose endpoints for the operations you need.
  • Host it anywhere (Railway, Render, AWS, etc.).
  • Connect Bubble to those endpoints through API Connector.

This is the standard and only stable way to connect Bubble to an external database.

Explore More Valuable No-Code Resources

How to integrate Bubble.io with Git?

Learn how to seamlessly integrate Bubble.io with Git through our comprehensive step-by-step guide. Perfect for beginners and professionals.

Explore

How to integrate Bubble.io with Reddit Ads?

Learn how to seamlessly integrate Bubble.io with Reddit Ads using our easy step-by-step guide. Boost your ad management today!

Explore

How to integrate Bubble.io with AWS S3?

Explore our step-by-step guide on integrating Bubble.io with AWS S3, making your app development process more efficient and secure.

Explore

How to integrate Bubble.io with Lucidchart?

Follow our step-by-step guide to seamlessly integrate Bubble.io with Lucidchart, enhancing your workflow & productivity.

Explore

How to integrate Bubble.io with Kentico?

Learn how to seamlessly integrate Bubble.io and Kentico with our comprehensive, easy to follow step-by-step guide.

Explore

How to integrate Bubble.io with Box?

Discover easy-to-follow steps for integrating Bubble.io with Box. Boost your workflow and secure your files seamlessly today.

Explore

Stuck in Bubble.io? We’re here to help!

Fix broken workflows | Optimize logic | Boost performance | Scale with confidence

4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences