I have made a Google Sheets system which takes a user’s ID and creates their thumbnail to display in a cell. However it is quite tiring manually putting in the user IDs when I already have their names.
Is there a way to take their username and retrieve their user ID?
APIs must be called, then parsed into data which can be put into the cells. I don’t think google sheets can do this automatically, you will need to use a separate program to do this, which is a pain in the ass.
I think there’s a pretty nice algorithm for this, assuming the UserId column is directly to the right of the Username column;
Note that this is insanely bad pseudocode to give you an example.
for row in rows:
userid = POST username from row to API
username_column = getcell curr_cell_column + 1
username_column.update(userid) or similar
It’s a matter of looking through the Google Apps Script API, and googling questions each step of the way. e.g “update google sheets cell apps script” or “get next cell in range apps scripts”. You can start having a look here for examples. Class Range | Apps Script | Google Developers