I have an issue. I want to send a lot of contacts through GHL (CRM) to n8n where they will be written on google sheets, but this happens super fast and the contacts on google sheet get messed up.
So in the end only 1 or 2 contacts get in the google sheet. I believe that this is because the rows get overwritten by the new data.
I’m not sure how to proceed. Is there a way to store all the contacts that come from GHL somehow on n8n or some workaround?
I don’t think that the loop node will work because the item are already processed individually. I send the contacts from GHL 1 by 1 to the webhook in n8n. (btw if I didn’t understand you correctly feel free to correct me!)
I will give it a go with the http request and database.
Yes, you are correct about items being processed one by one. That’s a key behavior from n8n.
But what I’m telling you is to add a WAIT node in your loop, so you can give enough time for the Sheets API to process the inputs, instead of throwing everything too fast into it.
Sending items too fast to Google Sheets is unfortunately the reason for this bug.
I don’t know if n8n can fix this or if it’s an issue in the Sheets API.
To find that out, you would have to try my second suggestion, which is using a custom HTTP request node.
Please try one of the solutions I told you in my first reply. They will probably fix your issue
The issue is happening because the webhook you’re using to trigger the n8n workflow through GHL (CRM) is causing data to be written to the Google spreadsheet multiple times. This can happen when the webhook triggers before the previous data has finished saving, which results in new data overwriting what was already written.
A good solution would be to switch from the webhook to using the GHL API. This would allow you to first retrieve the contacts from GHL, check if they already exist in the spreadsheet, and only add the new ones. This way, you can avoid the data being overwritten and make sure only unique contacts are added.
I tried Airtable (kinda works but it has a maximum of 5 request per second) I ended up using supabase, it just works better and also added drip mode in GHL (1000 contacts every 5 minutes) otherwise n8n gets overwhelmed. Last test size was 8K+ contacts.