Sheets Writing Issue

I want to send an email and then write to a sheet each time a selector in the column switches to “OK” or “NOK.” It works very well, my emails are sent, and the actions go through the right branches. However, I have an issue with writing to Google Sheets at the end (I write a timestamp and a validation message for the workflow). Out of 10 rows, there are always 2 or 3 that don’t get written EVEN THOUGH n8n tells me that they were written. In the logs, n8n shows success, but on the Sheets side, there is nothing. Is it a delay issue? A number of requests per second? How can I fix this? Thanks a lot!Here’s my workflow : "Please share your workflow

Hi there, try something like this and see if this solve your issue

basically the changes i did is add a loop over items to make sure that each item is handled 1 by 1 and waits before it handles the next one, this make sure that you will not hit any rate limit and should be easier to debug, since you can see how each execution or each item are handled

hope it helps!

Ok I’m gonna try thanks for your help, just to know - what’s the use of the “Merge” node ?

Thanks a lot,

just to merge the 2 nodes, before going into the sheet nodes, it’s my way to go if i want to unify multiple branches into 1, because if you just unify it straightly without the merge node, there will be a case where the node will be confused on where is it getting its data, since there r multiple nodes connected to it

It seems to work but I’ve an error on one of my variables now..

change it to take from the Loop Over Items, so it shoud be something like this

{{ $('Loop Over Items').item.json.current.Mail }}

because it’s shuld be the same thing, but if you reference it from the loop over items node, you are referencing the exact item that are currently in the loop, and i think you exactly wanted to do that

I still have the same problem… it’s working on n8n side but don’t write on the Sheets

try this

what i change is inside the update sheet node, to instead use the row_number as the “column to match on” instead of the email

node as successful as soon as the API request is made, but Google may silently throttle or reject certain writes for going over quota limits, particularly with high-speed, repeated requests.

you should try these
Add a Delay Node: Add a brief delay (e.g., 100-200ms) prior to the Google Sheets node to prevent hitting Google’s rate limits.

Use the “Bulk Update” option: If you are updating rows individually, change to updating in bulk if available.

Retry on Failure: Utilize a “Error Trigger” node or a “Function” node to trap errors and retry the write after a brief delay.

if i was of help then mark it as a solution.
thankyou

Nice idea, where do I find the Delay Node? Ask your AI assistant to double check if it actually exists :slight_smile:

Hmm?

2 Likes

I have the same thought as you, but i dont say it, thank you for saying it :joy:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.