Describe the problem/error/question
I’m creating a workflow that should get a list of Google Sheets documents, and create a new Worksheet inside of each one.
The node is executing N times (same as the number of the input node), but it is always using the data from the first item, thus, creating the sheet in the first one from the list.
If I reorder the list, it will change the destination Document.
Changed the workflow to mock some data, but the result is pretty much the same if I use Code to mock, or get this data from some node that generate this items.
If I replace the Google Sheets node with other node, the items are correctly processed.
Please share your workflow
{
“meta”: {
“instanceId”: “dd07e2562ccc93dd97abb6efbd5b1753fc6c38b13ff5c7f2c3f4ba1eb745e075”
},
“nodes”: [
{
“parameters”: {},
“id”: “d412e3cb-ebbb-47d5-8f0b-e60e66dee284”,
“name”: “When clicking ‘Test workflow’”,
“type”: “n8n-nodes-base.manualTrigger”,
“position”: [
540,
260
],
“typeVersion”: 1
},
{
“parameters”: {
“jsCode”: “return {\n data:\n[\n{\n"id": \n"1qmKUZ15sshbN4Nl6xZP-uOxUaj5_XTU4DhyVYo-ZqJ0",\n"name": \n"111.111.111-23 - Andrews Oliveira"\n},\n{\n"id": \n"1nGeQ0cVKxT8di4Zy0orEaUN5L1KAOepx7JFBpAu-t5w",\n"name": \n"111.111.111-11 - Adna"\n}\n]\n}”
},
“id”: “44a222ed-ea69-4cd1-a81a-0a8200885edb”,
“name”: “Code”,
“type”: “n8n-nodes-base.code”,
“typeVersion”: 2,
“position”: [
760,
260
]
},
{
“parameters”: {
“operation”: “create”,
“documentId”: {
“__rl”: true,
“value”: “={{ $json.id }}”,
“mode”: “id”
},
“title”: “=n8n-sheet-{{ $now.millisecond }}”,
“options”: {}
},
“id”: “ded84f45-9b1f-4af7-b7a1-8987fc878ec3”,
“name”: “Google Sheets”,
“type”: “n8n-nodes-base.googleSheets”,
“typeVersion”: 4.5,
“position”: [
1200,
260
],
“credentials”: {
“googleSheetsOAuth2Api”: {
“id”: “fIw4sTFn8m6RAPsl”,
“name”: “Google Sheets account”
}
}
},
{
“parameters”: {
“fieldToSplitOut”: “data”,
“options”: {}
},
“id”: “70a93d8c-a476-484c-9db9-3f7b9af49cb9”,
“name”: “Split Out”,
“type”: “n8n-nodes-base.splitOut”,
“typeVersion”: 1,
“position”: [
980,
260
]
}
],
“connections”: {
“When clicking ‘Test workflow’”: {
“main”: [
[
{
“node”: “Code”,
“type”: “main”,
“index”: 0
}
]
]
},
“Code”: {
“main”: [
[
{
“node”: “Split Out”,
“type”: “main”,
“index”: 0
}
]
]
},
“Split Out”: {
“main”: [
[
{
“node”: “Google Sheets”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {}
}
(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: 1.63.0 and tested with 1.64.1 pre-release
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker
- Operating system: MacOS