Google sheets - searching for empty values and making unique ids

hi there!
I’m trying to use n8n and I see that typical use flows are rather copy/paste style of things.

I’m curious to learn how can I find rows with empty values. Currently, n8n asks me to have something in this field so it’s impossible to do such a query.

A second question is about making unique ids. Normally I just take time stamp and add a random number at the end. How to create a random function here? how to connect it with timestamp?

Welcome to the community @q3r3rv13rv3!

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:

{{new Date().getTime()}}-{{Math.ceil(Math.random()*10000) }}

I hope that helps. Ah and please in the future make sure to only ask one question per topic else it makes it very hard for people to find answers if they have the same question. Thanks!

With the just released version [email protected] it is now possible to search for empty values.

1 Like