A Step-by-Step Guide to Uploading Excel Data to your Bubble Database

This article describes steps on how to upload excel data to your Bubble database. To access and these features, you will have to upgrade to a paid Bubble plan.

To make it even easier, we’ve created a video tutorial that walks you through the process. Check it out!

Bubble Data

First, click Data at the left section of your Bubble account to access your Bubble database.

Under the App Data section, you have options to upload, modify or bulk upload data to your Bubble database.

Uploading CSV Data

Clicking the Upload button displays a popup where you upload a comma-separated CSV file of data. The type of data and relevant fields should be defined in the app before importing the file. This feature is available to users with a paid Bubble plan.

After clicking the Upload button, you will have to select the type of data and file to upload. Map the columns from the file to the fields of the data type and then validate and upload the data.

Important: The first row of your CSV file must be a header row containing the names of the fields for the data. Data should be valid to be uploaded (a yes/no field should only have yes/no values). Bubble validates all data prior to any upload, if one row is failing, nothing will get created and uploaded to the database. Note that if you are uploading repeatedly large amounts of data, we recommend working with the Bubble API and use some scripts to create data, as it’s a more scalable approach.

Modify

You can bulk-modify data via a CSV upload. To do so, you should have a file with a column containing the unique ID of the things you want to modify and enter the values that should be modified in subsequent columns.

This button generates a CSV file with the data of the current view. The file is exported to the Download folder of your browser. This file can be edited. Because the app owner performs this operation, no privacy rules apply, and all fields chosen in the current view are exported. Again, you can only access this feature if you upgrade to a paid Bubble plan.

Bulk Action

Bulk operations let you modify a chunk of data at once, in the editor. While it can be undone with backups, this is a dangerous operation and should only be done when you need to modify production data at once.

Clicking the Bulk button displays a popup that runs an API workflow on the entries in the current view. This is useful when you want to modify a list of things in the database. Select the API workflow you want to run. The workflow takes only a thing as a parameter.

Warning: This operation permanently modifies the data. If processing many entries, this may take some time.

The App Data tab also lets you run some workflows on all (or some) entries of a view. For instance, if for maintenance reasons you need to modify all users and mark them as ‘paid’, you will use a bulk operation. This feature leverages the Bubble POST API, allowing you to run some workflows in the background.

How to upload data as CSV file on your database

This popup uploads existing data from a CSV file. CSV is a standard way to represent rows and columns of data in a text format. Microsoft Excel, for example, generates these files. This feature is available to users with a paid Bubble plan.

Type of data

Select which type of data to upload. The type of data and relevant fields should be defined in the app before importing the file.

Data delimiter

Commas are typically used to delimit entries, but different delimiters are possible. Tab or pipe delimiters are useful when working with text that includes commas. Choose the delimiter in the application creating the CSV file.

Pick a file to upload

Select a CSV file to upload.

Map fields

This very important step is where you map the columns of data to the fields in the application database.

Custom field

Select a data type field in the dropdown menu for each column of data. These fields should be defined in the data type before the upload.

Composite field

If the field you’re matching the column with is a custom type, then specify which field of the subtype should be used to match the text entry. For example, let’s say you’re uploading a list of apartments, and one of the fields is an owner. If the owner is represented by a last name in the CSV file, choose ‘Last name’ as the composite field. The entries should exist in the database before you upload the file. If two entries in the Bubble application database match the same value, an error will be returned.

List delimiter

This is the delimiter to use when a field is a list of things. It should be different from the main delimiter. For example, if ‘;’ is used as the delimiter, the data should be in this form: 12;54;32;67.

Note: When importing data for type list, start to enclose the list in ‘[‘ and ‘]’ and separate the individual items with the delimiter. For example, [kitchen; bedroom; bathroom].

Validate data

Clicking this button starts the analysis of the data to be uploaded. All data checks are done on your computer for safety reasons. The Upload Data button displays only if all entries are valid. If your account is processing many entries, this may take some time.

Upload data

Clicking this button uploads the data.

How to use the Bulk Upload feature to upload excel data to your Bubble database

To perform some action on your data, you need to define some API workflows that you will call from the Data Tab, in the editor.

The process starts by heading to the API page of your app and creating an internal endpoint (it doesn’t have to be exposed) that takes one parameter and does some action with it.

The parameter type should be the type of data you want to process. Such an API workflow should not take another parameter, as when the bulk operation is running; it will call this workflow with the thing as the only parameter.

Let’s say you have an app with a type ‘House’, and a field ‘unsold’. You realized afterwards that the unsold field should be set to yes for all houses, including the entries already created in the database. Here’s what the necessary workflow will look like.

And here is what the action would do, modifying the house sent as a parameter.

Once you are done with this part, you can head to the Data Tab, App Data section and select a view that shows houses.

Clicking on Bulk Operation will reveal the Bulk Operation Popup, which lets you define which entries you want to process, and which workflow should be used. You can process the entire view, or only select some entries in the table and run the workflow on these selected entries.

We hope you find this guide helpful in uploading excel data to your Bubble database. If you have any questions, contact our team and we’ll be glad to help!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top