I’m using the Google Sheets node to update data whenever a new order comes in. The problem is that instead of updating the row that matches the order ID, n8n sometimes creates a new row or updates the wrong one. I’ve tried using “Update Row” and mapping the order ID as the key, but it still doesn’t match correctly. Do I need to first search for the row before updating? Or is there a way to tell n8n to always use a unique column like OrderID as the reference?
@Rehare The Google Sheets node might be picking the wrong row because it’s not sure which one to update with the order ID try adding a “Lookup Row” node to find the right row first using the order ID, then tell the “Update Row” node to use that one. Also, check that the order ID is set as the unique key in the “Update Row” node and matches perfectly with no extra spaces, and make sure your spreadsheet headers are the same every time.
Make sure you’re mapping the correct column @Rehare (like OrderID) as the key in the “Update Row” option, and double check that the column name and data type match exactly.
This should help, kindly Mark as the solution if you found it helpful.