CSV Upload with Mapping to Unique_ID

Good Afternoon Bubblers,

It’s been a while since I’ve uploaded items into Bubble, using the App Data view, so I’ve forgotten how I’ve uploaded a CSV into Bubble so that the records in the csv match to their corresponding record, and update the correct value.

What I’m looking to do:
I’ve got a list of things for which I want to update one field. How do I map to the unique ID for that list of things, so it knows which records to update? I’m not finding the field for unique id




1 Like

This will require an API workflow I believe.

What I’d do:
Create a new field like “Temp ID”
Assign the Unique ID to the new Temp ID field.

Upload your CSV and it’ll create new data items.

Do a bulk API action on your data matching your original item’s unique id to the Temp ID field and then making your original items’ fields equal to the values found in the Temp ID Item’s fields.

Then run another action that deletes any item when the Temp ID is not empty. Your original items will not be deleted as they do not have a value in the Temp ID field.

Just a thought.

1 Like

Bubble does not currently offer this… Jason1’s suggestion is clever, I may try that, but +1 to have the OP as a feature request


Thanks much for the suggestion, Jason.

Whenever I create an API workflow, it doesn’t come up in the Bulk drop-down list. Do you suppose this is a bug?
Also, regarding the construction of the workflow: Since the API wasn’t working as expected I built it to fire upon button press:

  • Make changes to a list of things (donated items, in this case), which have no Temp ID set (no changes applied, it’s just intended to get the list of things for the next steps)

  • Make changes to the result of step 1 (Donated Items without a Temp ID set), searching for donated items where the Temp ID matches each donated item’s unique id, and updating the corresponding winning bid and item number.

It’s not working as expected - the items where the unique ID matches the Temp ID aren’t getting their winning bid/item number fields updated. Any ideas?

If this is a one-time backend process for data, I would do it without the list. I would set a key donated_item and assign type Donated Item. Run that as a bulk API workflow from the Donated Item data view.

So in a nutshell, I’d do something like this:
Create an endpoint and call it temp_item_transfer (whatever)
Key: donated_item
Type: Donated Item

In workflow, make changes to a thing, Donated Item
Thing to change: donated_item

Winning Bid = Search for Donated Items’s (Temp Unique ID = This Donated Item’s unique id):first item Winning Bid
Same for Item Number

Then run another workflow to delete all Donated Items, Temp Unique ID’s value is not empty.

I’d first do this with development side data, just to be sure that the logic is sound:slight_smile:

Let me know if this helps or if I’m confusing you or making things harder!

Awesome, thanks for the idea, Jason!

I’ve got the workflow set up, but I’m not quite sure about how I’d set the key (donated_item) or call it if the data already exists in the database. Your ideas?

I think it’s better to set your Item Number = Search for Donated Items’s:first item’s Item Number (like you have for winning bid).

With this endpoint you should be able to go to your data table viewing all Donated Item
Use Bulk and select the endpoint. It’ll run with the Donated Item key across all items that match the search criteria.