Search code examples
google-sheetsgoogle-sheets-apispreadsheetn8n

Append data into google sheet using n8n not working as expected. Instead of appending, it's replacing from the first row


I’m using n8n to append data into my google sheet when the webhook url is called. I've a sheet named 'M2'. I’m using the Google Sheet node with Append option to append the data. I also tried the Append or Update option. The execution gets successful and also the connection to the google sheet is made but somehow it’s not working correctly. Instead of appending the data to the end of the rows by matching the columns, it’s replacing the sheet from the first row. Even the column names are replaced. I am not sure what I’m doing wrong, any help would be appreciated.

I’ve attached my node configuration and the output below.

n8n google sheet node config


Solution

  • I faced a similar issue once before. I tried many solutions but nothing worked. At the end, but with random testing, I came to know that it only works when you have the sheet name length greater than 3.

    For example, The sheet with the name M2 will not work, but ABC2 will work.

    I know that it is a very weird issue, but it worked for me anyway. Maybe it works for you too.