Google sheets: getting the row I just appended

I have a problem that I think could be solved in two airtight ways. The problem is that I want to add a row into a spreadsheet and grab the resulting VLOOKUP value in another column on that same row.

Unfortunately appending a row doesn’t give you the row number so you have no way of getting that row back. That’d be one way to solve it.

The other way I can think of to solve it is using a lookup node to look up the exact thing I just appended. But that wouldn’t necessarily work because sometimes I’ll append things with the same value.

I can come up with workarounds such as appending and then looking up the value and only grabbing the last row, or using a unique ID for each row and looking that up. The first one is prone to errors with race conditions and the latter requires adding to the data in a way that I don’t want to do (plus coming up with a unique ID system…)

Any suggestions?

Hi @Giovanni_Segar, I hope you’re well?

First of all, I think returning the row number would make a great feature request for the Google Sheets node.

With this not being available at the moment, I think using a unique ID can make sense for the time being. As for generating a unique ID, you could use a solution like the one suggested here: Function to generate UUID or similar - #2 by jan

That’s actually what I decided to use for now. But it’s definitely not my favorite solution