n8n data appending to Google Sheets not functioning correctly: overwriting instead of adding rows

I’m having trouble with n8n and Google Sheets. I’m trying to add new data to my sheet called ‘M2’ using the Google Sheet node. I’ve set it to ‘Append’ mode but it’s not working right.

When I run it the connection seems fine and it says it’s successful. But instead of adding new rows at the end it’s replacing everything from the start. It even overwrites the column headers!

I’ve tried both ‘Append’ and ‘Append or Update’ options but get the same result. I can’t figure out what’s going wrong. Has anyone else run into this? Any ideas on how to fix it?

I’d share a screenshot of my setup but I can’t add images here. Basically I’ve got the Google Sheet node connected to my webhook and pointed at the right sheet. The mode is set to append but it’s just not working as expected.

Any help would be great. I’m kinda stuck!

I’ve encountered a similar issue with n8n and Google Sheets before. It turned out the problem was related to the range specification in the Google Sheets node. Make sure you’ve correctly set the ‘Range’ field in your node configuration. It should be something like ‘Sheet1!A:Z’ to append data to all columns starting from the first empty row.

Also, double-check that you’re using the latest version of n8n and the Google Sheets node. There were some bugs in earlier versions that caused unexpected behavior with appending data.

If these don’t solve the issue, try creating a new sheet and testing with that. Sometimes permissions or sheet settings can interfere with the append function. Lastly, consider using the ‘Update’ operation instead, specifying the range as the next empty row. This might circumvent any quirks with the ‘Append’ mode.

hey, i had this problem too. check ur sheet permissions - sometimes they mess up the append. also, try clearing the range field completely. worked for me! if not, maybe use a different node like ‘Google Sheets Trigger’ to fetch existing data first, then append. good luck!

I’ve dealt with this exact issue before, and it can be really frustrating. One thing that worked for me was double-checking the ‘Key’ field in the Google Sheets node. Make sure it’s set to the correct column that uniquely identifies each row. If this isn’t set properly, n8n might overwrite existing data instead of appending.

Another trick I found helpful was to add a ‘Function’ node before the Google Sheets node. In this node, you can add a timestamp or unique identifier to each entry. This ensures that each row is treated as new data.

If all else fails, you might want to consider using the ‘Google Sheets’ node in ‘Update’ mode instead of ‘Append’. You can use a ‘Function’ node to determine the next empty row in your sheet, and then update that specific row. It’s a bit more work, but it gives you more control over where the data is placed.

Hope this helps! Let us know if you manage to solve it.