Lookup UID and delete single row with google sheets node

I have a Google Sheet with a UID from another software in column A. Is it possible to lookup for one UID in column A that I get from my trigger node to delete this specific row afterwords? I found the lookup and the delete function in sheets node but have no clue how to combinde to get the result. Thanks for helping me. Is it possible to get the row number after lookup?

No that is currently sadly not supported.

The only thing you can do right now is to use “Read” and then query only the UID column (best in “RAW Data” mode). In a Function-Node you can search through that data to gets its index which you can then use to delete it.

Hope that helps!

ok, np. Would you be so kind to give me an example for the function node? have no clue how I can get the row index…

Sure, here a complete example:

1 Like

thank you so much!

Sure, happy if it helped. Have fun!

Hey @jan, I need to delete a row from Google Sheet and I’m trying to use your exemple but isn’t working.

In my case, I have this Google Sheet data:

I need to delete the row “number 4” looking for its SESSION_ID, is it possible?

Hey @leucotron!

Can you please share what problem you’re facing? I tested out the workflow that Jan shared, and it works well for me.

Hey @harshil1712

Follows the workflow.
In the workflow, when IF3 is false, it need to delete some line from Google Sheet (line that SESSION_ID is Set2 value).

How to share without lose the format?

Looks like you figured out how to share the workflow without losing the format!

Coming back to your question, I’ve modified the workflow a bit. I’ve updated the references, and add a reference to the index in the Google Sheets 2 node. It looks like you were not referencing the index value for that. Let me know if you still are facing issues :slight_smile:

Didn’t work…

My “start index” is -1 and it is causing the error.
This value is Function output, I’ll analyze this.

Hey @harshil1712, thank you help me about this topic, but we chage the project and won’t use Google Sheet anymore.

If the start index is -1, it means that the value doesn’t exist in the output array. Based on the output of the Google Sheets node, you would have to change the code in the Function node.

Let us know if you need help if you still use this solution :slight_smile: