Google Sheets Node Sheet Parameter Not Saving

Describe the problem/error/question

I am using the Google sheets node to append/update rows in a google sheet. The google sheet is a template that is being copied multiple times….the same standard format but being used to create individualized statements through a loop.

When I set the parameters in the Google sheet node, the data maps automatically to the columns and fills the data on the Google Sheet successfully. BUT after that step is executed the node removes the sheet name and mapping. I then need to enter the sheet name and configuration again. See below for screen shots before and after I execute the step:

Before (all mapping set up and working):

After (Sheet ID deleted, prior sheet mapping no longer saved)

This obviously makes ‘looping’ a challenge, as the parameters in the node need to be reset each time. Is there a setting in this node that keeps a static value for the Sheet ID, knowing that the template values will never be different?

What is the error message (if any)?

See screen shots above.

Please share your workflow

(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

Information on your n8n setup

  • n8n version: Running version [email protected]
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Can you share a little more context? Where are the _sheetId and gid coming from?
if you could paste the relevant nodes on your workflow that are involved in this it would be great

The _sheetId and gid are coming from the workflow further upstream, and I can validate that those are correct and working. The issue is what happens after I execute this specific node. Below is the node json for the first time I run it. Note that gid and sheetId are able to locate the file schema and data is loaded to the sheet.

{“parameters”: {“operation”: “append”,“documentId”: {“__rl”: true,“mode”: “id”,“value”: “={{ $json._sheetId }}”},“sheetName”: {“__rl”: true,“value”: “={{ $json.gid }}”,“mode”: “id”},“columns”: {“mappingMode”: “autoMapInputData”,“value”: {},“matchingColumns”: ,“schema”: [{“id”: “MARKET_MANAGER_EMAIL”,“displayName”: “MARKET_MANAGER_EMAIL”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true},{“id”: “NAME”,“displayName”: “NAME”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true},{“id”: “MANAGER_EMAIL”,“displayName”: “MANAGER_EMAIL”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true},{“id”: “MANAGER_NAME”,“displayName”: “MANAGER_NAME”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true},{“id”: “JOB_TITLE”,“displayName”: “JOB_TITLE”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true},{“id”: “START_DATE”,“displayName”: “START_DATE”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true},{“id”: “COMP_RATE”,“displayName”: “COMP_RATE”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true},{“id”: “STATUS”,“displayName”: “STATUS”,“required”: false,“defaultMatch”: false,“display”: true,“type”: “string”,“canBeUsedToMatch”: true}],“attemptToConvertTypes”: false,“convertFieldsToString”: false},“options”: {“handlingExtraData”: “ignoreIt”}},“id”: “c7a469c7-b615-4a1c-87d0-5f51b5001db2”,“name”: “Write Config Data”,“type”: “n8n-nodes-base.googleSheets”,“typeVersion”: 4.7,“position”: [15104,5136],“alwaysOutputData”: true,“executeOnce”: false,“credentials”: {REMOVED}},“onError”: “continueRegularOutput”},

After the execute step is completed, the node reverts back to “null” for the sheetName value. Here is the json directly after the step is executed:

{
“parameters”: {
“operation”: “append”,
“documentId”: {
“__rl”: true,
“mode”: “id”,
“value”: “={{ $json._sheetId }}”
},
“sheetName”: {
“__rl”: true,
“value”: “”,
“mode”: “id”,
“cachedResultName”: “”,
“cachedResultUrl”: “”
}
},
“id”: “c7a469c7-b615-4a1c-87d0-5f51b5001db2”,
“name”: “Write Config Data”,
“type”: “n8n-nodes-base.googleSheets”,
“typeVersion”: 4.7,
“position”: [
15104,
5136
],
“alwaysOutputData”: true,
“executeOnce”: false,
“credentials”: {
REMOVED
}
},
“onError”: “continueRegularOutput”
},

OK, I see. I tried a minimal example to try to reproduce the problem happened to me once after executing, leaving and re-entering the node. But after that first time the gid parameter remained as expected.

Trying a minimal example as this one is important since it helps others debug your problem, and narrows down the possible causes of the problem

If this happens to you consistently you should probably report an issue in the github repository. In order to do it please find the exact steps to reproduce it, describe it properly, adding a minimal example of workflow that causes it.
also include you system information:

    n8n version:
    Database (default: SQLite):
    n8n EXECUTIONS_PROCESS setting (default: own, main):
    Running n8n via (Docker, npm, n8n cloud, desktop app):
    Operating system: