Guide to upload CSV and add to database

Where can I find an educational guide on getting information into the Bubble database from a CSV?

I’m building an educational game for sound engineers. It already exists as a Google Sheet. I just need to figure out how to make it into a web app. I have already taken a Udemy course and read much of the forum here. From what I understand so far I need to: Use the file uploader to trigger a workflow that includes the Data Parser and Upload Data as CSV.

Problem 1

I have read the Data Parser instructions, but I don’t understand them.

Block Size: set this to the size of each block of data

But every column of my CSV files is of different size. For example, here’s the beginning of the file:

Frequency (Hz) Magnitude (dB) Phase (degrees) Coherence
10.742188 51.66 -53.29 0.00
11.718750 56.99 -58.93 0.00
12.695312 62.05 -64.41 0.00
13.671875 66.75 -69.67 0.00
14.648438 71.00 -74.64 0.00

Use Parser element’s states to get a text-list of headers

I have used custom states once, but this doesn’t make any sense to me. Is there a step-by-step guide somewhere?

Problem 2

My CSV files have about 800 rows. I would need a $185/month Team plan. My understanding is that Data Parser helps to get around this limitation somehow?

The first steps of creating pages and a login system seemed pretty straight forward, but now I’m stuck. I guess I was hoping it would work more like Google Sheets or Excel.

Is this a one-time upload? You can upload via the editor: Data > App Data > CSV. You do have to be on a paid plan, but this will let you upload your entire file in one go. This will also let you map your CSV columns to the data type fields, so your file doesn’t have to be perfectly labeled.

See reference here: https://bubble.io/reference#Interface.DatabaseViewer.ImportCSV


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:

3 Likes

Thanks @romanmg. It is not. At first, yes, I can do some of them that way, but the goal is that students would be able to upload their own measurements to play the game.

I just tried uploading via the editor, which worked great, but took way too long. My idea is that student upload two measurements at once and are able to start playing with them within seconds.

@romanmg do you know how a user could upload a CSV file and map them to fields in the database from a live website?

2 Likes

Have you figured out a solution to this question?

Looking for same solution… user interface to upload csv, parse, data in database

2 Likes

I figured out a solution using the box plugin to manage file uploades in Bubble, the using integromat for parsing and entering data in Bubble.

2 Likes

Would you mind sharing your process @jaredg ? I am having this same issue and can’t figure out a solution. Thanks!

1 Like

I am also wondering how a user can upload a CSV file and map the fields like @bubble17 mentioned. Do you have any insight @romanmg?
Thanks so much!!

Hi @jaredg, would you mind sharing how you did this?

My clients currently use the .csv file uploader on a daily basis. I give them instructions on how to modify their .csv to ensure that the fields are all in the database. I then allow them to modify any date and time fields once uploaded. I found that duration and date/time fields kept causing headaches and a terrible UX, so I just have them clear those fields upload and then created workflow solutions to modify as necessary.

So long story short, as long as the fields match perfectly, the file will upload without issue. If you have any other specific questions let me know.

Setup the box plugin to use it for file uploads following these instructions:

Then setup integromat using the videos/instructions here: Integromat + Bubble resources

I then created an API call in my Bubble app that sends the Box File ID to Integromat. Integromat Webhooks see this trigger, then grab the file from Box with that file ID.
more instructions here: https://support.integromat.com/hc/en-us/articles/360009497153

Integromat has Bubble modules that let you insert a bunch of database records or run a workflow. I insert my records from the processed text/csv file into the database with the “Create the bulk of new Data Things” module in Integromat, then I use the Bubble Run a Workflow module in Integromat to trigger a backend API endpoint in my bubble APP to tell me that the process has been completed.

Still working out kinks and bugs, but that’s the basic flow.

2 Likes

Thanks!

Hi @jaredg I know it’s been a while but, have you managed to send the CSV directly to integromat for parsing instead so you can skip the box integration?

No, I actually abandoned this path and stopped using integromat. I hired a developer to build a PHP API endpoint on a basic hosting account. Now I send the csv files directly from bubble to that custom API, which then uses the bubble data API to place the parsed data directly into the Bubble database.

4 Likes