It’s a little difficult but you would create a new endpoint in your backend workflow and then using something like Postman you will send a POST request to your endpoint while it’s in “initializing” mode and it will pick up all the fields in your CSV.
The body of the Post request needs to be the json generated by the plugin.
There isn’t a validation feature, but I assume its irrelevant because you will be hand picking each column and deciding which field to populate in your Bubble database when you are creating the workflow in your backend.
Also keep in mind the headers used in your CSV has to be exactly the same in every csv file or else your bubble backend workflow wont recognize those headers. When you run the “initializer” it saves the names of the headers, so anything different will be ignored by bubble.
| First Name | | Last Name | | Age |
Shawn Lancer. 28
(field) Fname ------> First Name (CSV Field)
(field) Lname ------> Last Name (CSV Field)
(field) age ----------> Age (CSV Field)
@avern87 if you need validation and the ability to upload any csv file with any type of headers and have the user match their own headers with your pre-defined ones, then flatfile.io would be a good solution for you. I recently did a custom integration for @ksaitow1 let me know if I can help with yours if needed.
Thanks for all the help! Yea, I love FlatFile’s product, but $99 a month prices me out.
I’m getting an error when I try to run this plugin on an uploaded CSV. I’m uploading, running your parse action and then attempting to set a state to the result json so I can fire off the results to detect the api parameters.
Here’s the error:
Plugin action Convert CSV to JSON error:
ReferenceError: $jscomp is not defined
at eval (eval at build_function (/var/task/index.js:55:21), :1:105)
at Object.async_fn [as async] (/var/task/index.js:242:13)
at eval (eval at build_function (/var/task/index.js:55:21), :1:75)
at run_fn (/var/task/u.js:594:18)
Two questions for you. First, when I set the preview field to just 3 lines, the server times out. But, when I allow it to process the whole CSV, it runs without issue. Weird right?
Second, I put the json result into a text element on the page and used that to initialize the backend workflow with the right day. But, it seems detecting the data gets rid of the other parameters I put in the workflow. I want to send the CSV + a Client and a Team. Am I missing something?
Would like to get your take on how (or if) your plugin would take a csv file that has row headers instead of column headers? An example is shown below where I need to take 13 columns of data (12 months and 1 description) and input that into the database. It’s almost as if I need a solution that can turn the csv on its side first.
This plugin looks very interesting! Thanks for your work! Would you please share how you build the backend workflow to update the database? Also, how do you pass the JSON generated from Convert to JSON action? I would love to try this plugin but got stuck.
Thanks for the instruction! I am able to get the endpoint recognizing the data converted from the plugin. I use the plugin to send a sample csv to a mock endpoint URL and then use Postman to send the JSON body back to the Bubble endpoint URL.
However, when I try to add that backend workflow, it’s not showing up in the dropdown…
Sorry for bugging you again. I have been banging my head against the wall and still couldn’t get my API workflow to work. I used your plugin to parse CSV and have Bubble’s endpoint detected the data sent to it. I also configured subsequent API workflow to create a thing using the data coming from the API endpoint. However, I can’t select the API workflow on the page where I want it to be triggered. It seems I need to “manual definition” the data sent to Bubble.io for the workflow to be called. Is this true or I’m missing something?
I have a doubt… when i upload my csv file and change for example to create product on my database, it creates list of values instead of one item per line as it suppose to be… is there a way so it reads every line as a different product? because if i say that, for example…
Creat a new product… where “name = title”… instead of creating as many products as i have by line, it just put all the titles in the same field as a list, even though my data field is not a list.
I’m having a hard time figuring out how to send over the JSON data to my backend workflow.
I can’t figure out how to take the whole JSON string and divide it so each parameter gets only their slice of the pie.
(My backend workflow gets data from SP-API as CSV but I’m having a issue with bubble because the max CSV import they allow is 1,000 rows, and that’s why I’m converting it to JSON first, but I’m getting a issue when it comes to loading it into my database)