API Workflow to upload bulk new users and associated data

I’m able to upload a CSV of new users and create accounts for them based on the emails in the CSV. Now I need to add the additional meta data (Name, Address, role, etc that’s in the CSV) to the users table for those users.

How do I associate the new user in the user table with the user in the CSV table so that I can append the metadata to the corresponding fields for the user I just created an account for.

THANKS.

Could you create a new data type called “meta data user” (or something like that) which has the meta data in it including the email address and then a trigger in backend workflows which says when this thing is created it searches for an existing user with the same email address and makes changes to that user (adding the meta data) when it finds it?

@tmuelle1 's approach is the way to go here. Create a new data type with all text fields corresponding to the CSV columns you have.

Then, create a backend workflow database trigger that looks for changes to the new data type you created. Create a condition on this trigger that says “only when [data type] before change is empty and [data type] now is not empty” which basically tells Bubble → run these actions whenever a new record is created in this data type.

In the workflow actions, search the user table by email (make sure your privacy rules allow for this) to find the correct records, and then update the fields on the user data type to match the fields from your import data type.

Then, you should be able to upload a CSV file to the import data type in your app data tab, and all of the user data will populate automatically based on the trigger you set up.

This topic was automatically closed after 70 days. New replies are no longer allowed.