Back to overview

How to connect to a Baserow database to Bubble

Baserow is central to no-code stacks that include data capturing, processing, and logic that powers workflows. As an API-first platform, Baserow integrates with other tools—such as Integromat/Make, Zapier, n8n, and more—to create a complete stack that powers enterprises of all sizes.

Bubble is a no-code platform that allows users to create web applications without writing code. One of the features of Bubble is its ability to connect to external databases, allowing users to store and retrieve data from their applications. Integrating Bubble with Baserow API can help streamline your workflow and data management. With Bubble’s API Connector plugin, you can set up connections to Baserow from your Bubble application and create a Bubble workflow action to automatically create new data rows.

What we’ll do

In this tutorial, you’ll learn to automatically add information to a table on Baserow from an app. We will walk you through the steps to connect to a Baserow database via the Bubble API Connector, so you can get started with building powerful data-driven applications.

We’ll follow these steps:

What we’ll need

We will integrate no-code tools. These are the tools we need:

Let’s get into how to use API to manage and populate your Baserow database.

1. Set up a Baserow database

First, log into Baserow. Then, create a workspace by selecting the ‘+ Create workspace’ button in the dashboard.

Name your workspace, and select the ‘Add workspace’ button.

Once you’ve created a workspace, add a database from scratch to the newly-created workspace or add a database from the template library.

A new table will be created when you create a new database from scratch. Add the following fields to the database table:

Field name Field type
Name Single line text
Email Email
Company Single line text

Set up a Baserow database

2. Create a database token

Within your Baserow user account, you can create multiple unique database tokens that allow Baserow to connect with other apps. You can create and find the database token under your account settings.

To create a database token:

  1. Go to your profile, then navigate to your ‘Settings’ page
  2. Click on the ‘Database tokens’ tab
  3. Click on the ‘Create token +’ button
  4. Write a descriptive name for the token, and select the existing workspace that you want to tie the token to
  5. Click on the ‘Create token’ button to create a new database token for the selected workspace and the authorized user.

Create a database token

API tokens provide similar functionality to login credentials, but they provide additional security and flexibility. A token, like your username and password, should be kept secure and handled with the utmost confidentiality.

Creating database tokens is available to all Baserow users; you don’t need to be on a paid plan.

3. Get parameters from the database API doc

To connect this database with Bubble, we need access to the database API documentation. Click on the vertical ellipsis  beside the selected database to access the API documentation. Then, select ‘View API Docs’ from the workspace menu.

This API documentation is automatically generated and specifically based on the tables and fields in your selected database.

Get parameters from the database API doc

You may view all the newly created fields as well as other endpoints. Copy the HTTP method and the endpoint that defines the requested action.

Baserow API follows REST semantics, uses JSON to encode objects, and relies on standard HTTP codes, machine and human-readable errors to signal operation outcomes.

4. Develop an app using Bubble

Create a new app on Bubble or start from one of the ready-made apps and templates created by the Bubble community.

For this tutorial, we’ll install the CRM & Sales Pipeline Lite template.

Develop an app using Bubble

5. Install the API Connector plugin on Bubble

To create a Bubble workflow action that creates a new row of data, we must first install the API Connector in Bubble. The API Connector allows you to set up connections to Baserow from your Bubble application.

The API Connector can be found in the plugin gallery from the Plugins tab. To install the plugin, navigate to the Plugins section of the Bubble editor and click Add plugin. Search for *API Connector, then click the Install button.

Install the API Connector plugin on Bubble

Once installed on your app, the plugin requires further configuration for each API and each call desired. We now need to connect our Baserow database to our Bubble app.

6. Set up Baserow API authentication

We want to connect our database to Bubble using the API connector plugin.

Click the Add another API button to set up authentication and the different call(s) we want to use. You can set up headers, parameters and a call, and each call can be set up to be used as an action in your app or as a data source.

  1. Set the API service name as ‘Baserow

  2. Set the Authentication as Private key in header

  3. Set the key as ‘Authorization’ and the value as ‘Token YOUR_DATABASE_TOKEN’. Replace the placeholder with your Baserow database token created in Step 2 above.

  4. Get the specific headers from the API documentation. Shared headers will be added to every call in the relevant API.

    Set up Baserow API authentication

  5. Set the API call name as ‘Create row’.

  6. The Use as dropdown lets you select whether to use that particular API call as a data source or an action. Use as “Action” makes the API call available as an action in your Workflow editor.

  7. When a call is made to a specific resource, we need to specify an HTTP method that tells the server what action we want to initiate. Select POST to create data.

  8. Paste the endpoint copied from the Baserow database API documentation.

  9. Add the Request body. Use <> for dynamic values in Bubble.

    Add the **Request body.** Use <> for dynamic values in Bubble.

  10. Click the Initialize button to ensure the call works and see the server’s response.

Once you configure an API call, you need to initialize it. If you don’t, it will not appear in the Bubble editor. Initializing a call runs/executes it. If a call deletes an item or creates an item that requires a unique ID, the Initialize call button will delete or create the item (if successful).

Bubble will make an API call to your base and display the response schema. Make any necessary changes to your data.

Click Save.

With the API Connector plugin and Baserow API authentication set up, you can now create a Bubble workflow action to create a new row with data from the app.

7. Create a Bubble workflow action

To connect and sync our Baserow account, we can create a row in Baserow from Bubble data. Creating a record in your Bubble app database is like adding a new row to your Baserow table.

To set up the workflow action, create a button or other user interface element to trigger the workflow action. When the user clicks the button, Bubble will make an API call to Baserow, adding the data to your database.

  1. Create a workflow and an action where you’ll pass the input values.

  2. Find API action calls in the workflow editor under Plugins. Then, select the “Create Row” API call we created.

    Create a Bubble workflow action

  3. From there, you can specify the data you want to add to your Baserow database. You can use dynamic values in Bubble to add data to your Baserow database.

Bubble will send the values in a format Baserow can understand.

Bubble will send the values in a format Baserow can understand.

Add data in your app to populate the table on Baserow.

Add data in your app to populate the table on Baserow.

Next steps

You can also modify a row in Baserow using Bubble

  1. Create a popup and input fields.
  2. Pass the relevant data to display the current value of the row as initial content.
  3. Specify the initial content of the input fields to display the current record data. The initial value of any input field is the initial content.
  4. Create a workflow where the user clicks on an edit button to show the popup displaying the current information.
  5. Dynamically pass the data using workflows.
  6. Trigger a workflow when the button ‘Update’ is clicked to modify the selected row in Baserow.

You can also modify a row in Baserow using Bubble

Key takeaways

By following the steps outlined in this blog post, you can easily set up Baserow API authentication and create a Bubble workflow action to add data to your Baserow database. With this integration, you can easily manage your data and streamline your workflow, saving you time and effort.

If you run into any issues following this tutorial, feel free to reach out and ask for help in the Baserow community.

What’s your use case? Tell us how you use Baserow

September 12, 2023 by Bram Wiepjes
Release 1.20

Baserow version 1.20 comes with email notifications, workspace level audit log, search for calendar view, new shortcuts, context menu improvements, and more.

January 26, 2023 by Georgina Brisk
Best Airtable alternatives
January 10, 2023 by Olivier Maes
No-Code Platforms in 2023
Want to contribute?

Want to write a post in collaboration with us?

How to contribute?