Hm yes looking for empty rows was not really planned so it is probably really not possible right now. So it will not work with the Lookup and has to get changed in the code. Did add it to the To-Do list. A temporary workaround would be to simply request all the data with “read” and then doing the filtering with an If-Node. Which is actually very similar to what the Lookup-Option does underneath the hood anyway.
Generating unique ids would work exactly the same in n8n. A possible expression which does what you described would be: