@andrewgassen was mostly correct: you have an email address (a TEXT, not a User). However you cannot create or change a unique ID of course. Those are created for every thing of any type in your DB. (They are immutable, though they can be destroyed, by deleting the data object with that uid.)
Whatever it is you’re uploading, you’ll need to just upload that and then run a workflow on it (either using the Bulk button/feature or similar in an admin interface of your own design).
Though an email address is not a User, you can of course locate a User object by email address.
You don’t say what the data you are uploading represents, but let’s say it’s like this:
You have a spreadsheet that has information on the pets cared for by your users. Each row represents a pet. Columns are Species, Pet Name and User Email. So it’s like:
** Species | Pet Name | User Email**
All of those fields are texts. (Suppose we had the age of the pet or its birthdate, those would be a number and date, respectively).
Let’s say that ultimately what you want is to create new things of type Pet (described by a Species and Name) and associate each one with the respective user (represented by User Email) as an entry on that user’s list of Pets (a field of type Pet that is a list).
Further, Species itself is not simply a text, but it’s actually a data type itself. (A data type that has one field, Name. This is again analogous to your situation of having a text that represents a User, but is not itself a User object, see?)
So, none of the data we have in the CSV describes, simply and purely, the objects we ultimately want to create or modify. So we must transform the results of our CSV upload into what we DO want.
How to approach this? First, in this case, the things created by the upload are of some intermediate type. Second, we can think of them as temporary.
What you’d want to do on CSV upload is create objects of data type “Temp User Pets” or similar.
Once the upload is complete you run a workflow on the list of all Temp User Pets that:
0… Takes an object of type Temp User Pet as its argument (we could call that key “InputPet” for purposes of the workflow).
-
Makes a new Species if there is not already any Species where Name = InputPet’s Species.
-
Makes a new Pet (with Name = InputPet’s Name, Species = Do a search for Species where Name = InputPet’s Species:first item).
-
Takes the results of step 2 (the newly-created Pet) and pushes it on to the User’s list of Pets. (Make changes to a thing of type User. Which User? Do a search for Users where Email = InputPet’s User Email :first item. Field to change: Pets add item Results of step 2).
-
Being done with this temporary object, we could delete it. Delete a thing of type Temp User Pet. Which one? InputPet.
Once that workflow is created (this would be created in the “API Workflow” Page as it’s a server-side workflow, not a workflow we run in a page), we can run it either in our app (calling it via schedule API Workflow on a list where the list is Do a search for Temp User Pets) or, the easier way: go to App Data Tab, look at entry for All Temp User Pets and hit the Bulk button to execute that workflow on the objects.