Google sheet: data is replaced in the existing row instead of adding new row

Hi,
I have been trying to add the data to Google sheet through ‘append’ and ‘append or update row’ but it does not work correctly. For example, if I am adding 4 rows then sometimes it adds 2 and sometimes 3. It adds first row and then it updates the same row and overwrite the data. What should I do in this case? Please help.

n8n version: 1.71.3
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Operating system: Linux

Please post your actual workflow using </> button here. Also pin data in critical nodes.

There is a lot of possible causes to the situation you face. Actual setup will help to pinpint the cause and suggest meaningful solution, skipping a bunch of wrong theories to validate.


I have attached the ss. Kindly check and reply

At a glance, nothing is wrong with your setup. The error is more likely is logical or stems from data or its structure. It is hard to tell without having the actual workflow and sample of data the workflow fails on.

One possible source of mistakes can be caused by addressing an earlier node directly. Due to possible data transformations the references between items can break which may lead to bugs that are hard to pinpoint. Again, without having an entire workflow and sample data it is hard to tell.

Just a blind shot - make sure that values for Task id in your set are all unique or undefined.

This is workflow ss.

This is flow decision ss:

This is webhook settings:

@Olek , I have ss for workflow and other nods with details. kindly review and reply.

Here is how to post a workflow on the forum

  1. On your workflow canvas:
    (a) execute the workflow,
    (b) pin critical data that other users cannot have (from e.g. HTTP request or Google Sheet, Airtable etc),
    (c) select the nodes you want to post and copy them (Ctrl/Cmd-C).

Record_2025_03_23_13_01_27_633

  1. On the forum:
    (a) create a post or reply,
    (b) explain your case in details,
    (c) click the </> button on a new line,
    (d) paste the workflow JSON (Ctrl/Cmd-V)

:warning: Keep the triple backticks (```) intact!

Check if the workflow is properly rendered.

Record_2025_03_23_13_06_11_966

  1. Finally, unpin the data if you do not need it anymore for your purposes.

Record_2025_03_23_13_03_04_809

@Olek I have posted the workflow as per your instructions. Removed the google sheet link.

n8n replaced the existing row for both ‘append’ and ‘append or update’ flow. I checked with Airtable and all the records were inserted on a new row. So, its related to n8n that when I try to add the records, it does not add all in new rows, instead it replaces some of the records.

While overwriting rows may happen due to race condition, I do not think it is a good explanation in your scenario.

How do you know it replaces rows in strictly Append scenario? Does sheet change history tab show that the replacements actually took place?

Another possibility is that the node adds rows somewhere at the end of file. Press Ctrl-Down in the Sheet a couple of time to check if there is any data down below. This may happen if rows inbetween contain “invisible” data (e.g. formulas that do not produce visible values but still may make the row marked as “in use”; happens when cleaning is not thorough enough).

Having no sample data it is hard to test the case, pinpoint the cause, spot possible logical mistakes in the algorythm implemented, and eventually render proper help in reasonable time.

I am frankly run out of ideas for hypotheses to test.

yes, it replaces the row and It shows history.
it does not add anywhere else.

As a last resort, check this thread. Maybe you find some some insights for your case.
It was easier to solve that one because the data was available.