Describe the problem/error/question I want to create a loop that runs N times. So, I want to create a JSON object with 5 items to be send to the Loop over Items node. Apparently, I am struggling with the right syntax of the JSON object. What should it be. For example to run the loop 5 times. I want to place this object into the set node which is connected to the Loop over Items node
What is the error message (if any)? No error message
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and {
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
1648,
-192
],
"id": "f489e7a1-9673-419f-ad66-a6f1b9b66136",
"name": "When clicking âExecute workflowâ"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "d2b1532d-e8b3-4788-82b2-d60e6f08a0c9",
"name": "",
"value": "\t{ \t\tcolor: \"red\", \t\tvalue: \"#f00\" \t}, \t{ \t\tcolor: \"green\", \t\tvalue: \"#0f0\" \t}, \t{ \t\tcolor: \"blue\", \t\tvalue: \"#00f\" \t}, \t{ \t\tcolor: \"cyan\", \t\tvalue: \"#0ff\" \t}, \t{ \t\tcolor: \"magenta\", \t\tvalue: \"#f0f\" \t}, \t{ \t\tcolor: \"yellow\", \t\tvalue: \"#ff0\" \t}, \t{ \t\tcolor: \"black\", \t\tvalue: \"#000\" \t} ",
"type": "object"
}
]
},
"options": {
"ignoreConversionErrors": true,
"dotNotation": false
}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1872,
-192
],
"id": "f71838ad-0bb1-4f21-8477-997db8fd5335",
"name": "Items list"
},
{
"parameters": {
"batchSize": 4,
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
2064,
-192
],
"id": "26a8214d-7cde-4fad-b1f7-f814557b99ad",
"name": "Loop Over Items1"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"name": "Replace Me1",
"typeVersion": 1,
"position": [
2384,
-160
],
"id": "6667bfdd-0971-4c7a-9439-9d27a7cf3438"
}
],
"connections": {
"When clicking âExecute workflowâ": {
"main": [
[
{
"node": "Items list",
"type": "main",
"index": 0
}
]
]
},
"Items list": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[],
[
{
"node": "Replace Me1",
"type": "main",
"index": 0
}
]
]
},
"Replace Me1": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "a256caaf927d8b6fecd66012f15459060ec2fca55c23cb3757c0092517d4e8b9"
}
}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:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: