Google Sheet: Operation Append doesn't append but overwrite Data in Row when multiple requests come to a webhook

Describe the problem/error/question

Google Sheet: Operation Append doesn’t append but overwrite Data in Row when multiple requests come to a webhook

What is the error message (if any)?

No Error message, but only two rows added and one gets overwritten with multiple data

Please share your workflow

{
“meta”: {
“instanceId”: “405aa4f6777c2534cb2e11508b73199d3b281a859ceea00bdfea498dce75e571”
},
“nodes”: [
{
“parameters”: {
“operation”: “append”,
“documentId”: {
“__rl”: true,
“value”: “1bHyg6d2Ly8Hwksl7kbWVUmNlMAMwb4R9VQ0aJ4njvDk”,
“mode”: “list”,
“cachedResultName”: “Occupancy Test Sheet”,
“cachedResultUrl”: “https://docs.google.com/spreadsheets/d/1bHyg6d2Ly8Hwksl7kbWVUmNlMAMwb4R9VQ0aJ4njvDk/edit?usp=drivesdk
},
“sheetName”: {
“__rl”: true,
“value”: “gid=0”,
“mode”: “list”,
“cachedResultName”: “Sheet1”,
“cachedResultUrl”: “https://docs.google.com/spreadsheets/d/1bHyg6d2Ly8Hwksl7kbWVUmNlMAMwb4R9VQ0aJ4njvDk/edit#gid=0
},
“columns”: {
“mappingMode”: “defineBelow”,
“value”: {
“event”: “={{ $json.body.event }}”,
“eventType”: “={{ $json.body.eventType }}”,
“_id”: “={{ $json.body.data.object._id }}”,
“targetType”: “={{ $json.body.data.object.targetType }}”,
“target”: “={{ $json.body.data.object.target }}”,
“start”: “={{ $json.body.data.object.start }}”,
“end”: “={{ $json.body.data.object.end }}”,
“resource”: “={{ $json.body.data.object.resource }}”,
“team”: “={{ $json.body.data.object.team }}”,
“member”: “={{ $json.body.data.object.member }}”,
“status”: “={{ $json.body.data.object.status }}”,
“isShadow”: “={{ $json.body.data.object.isShadow }}”,
“organization”: “={{ $json.body.data.object.organization }}”,
“__v”: “={{ $json.body.data.object.__v }}”,
“createdAt”: “={{ $json.body.createdAt }}”
},
“matchingColumns”: [],
“schema”: [
{
“id”: “event”,
“displayName”: “event”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “eventType”,
“displayName”: “eventType”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “_id”,
“displayName”: “_id”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “targetType”,
“displayName”: “targetType”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “target”,
“displayName”: “target”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “start”,
“displayName”: “start”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “end”,
“displayName”: “end”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “resource”,
“displayName”: “resource”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “team”,
“displayName”: “team”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “member”,
“displayName”: “member”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “status”,
“displayName”: “status”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “isShadow”,
“displayName”: “isShadow”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “organization”,
“displayName”: “organization”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “__v”,
“displayName”: “__v”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
},
{
“id”: “createdAt”,
“displayName”: “createdAt”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“type”: “string”,
“canBeUsedToMatch”: true,
“removed”: false
}
]
},
“options”: {
“cellFormat”: “RAW”
}
},
“id”: “56dbc741-0013-4106-ad0e-19e8ba933dcc”,
“name”: “Google Sheets”,
“type”: “n8n-nodes-base.googleSheets”,
“typeVersion”: 4,
“position”: [
640,
220
],
“credentials”: {
“googleSheetsOAuth2Api”: {
“id”: “hWtUr81VA9drI8z8”,
“name”: “Google Sheets account”
}
}
}
],
“connections”: {}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

This is a webhook which gets called multiple times for a repetative booking, but instead of adding a new row each time to the google sheets, its add two rows and then updates the second one each time. I can see how the dates change when i run it.

Information on your n8n setup

cloud, testing currently if n8n would be a good fit for us.

Hi @Philipp, welcome to the community :tada:

This is unfortunately a problem outside of n8n and has been reported a few times (for example here). There are essentially three ways to avoid this I can think of:

  1. You could consider using a polling approach. Instead of waiting for the incoming webhooks, use a Schedule trigger and poll your data in regular intervals to avoid having these concurrent workflow executions interfering with each other.
  2. Use a webhook platform like Hookdeck or a similar tool to receive your webhooks, and then have it forward these webhooks to n8n only in safe intervals (in Hookdeck, the setting would be called “Throttled Delivery” and is configured on a destination level).
  3. Consider using a SQL database over Google Sheets that does not overwrite data when data is inserted through multiple parallel connections.

Hope this makes sense. Let me know if you have any questions on this :slight_smile: