Skip to content

Instantly share code, notes, and snippets.

@attiks
Created March 10, 2023 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save attiks/763d3b5f2740798097cd76bfcd779b86 to your computer and use it in GitHub Desktop.
Save attiks/763d3b5f2740798097cd76bfcd779b86 to your computer and use it in GitHub Desktop.
{
"name": "My workflow",
"nodes": [
{
"parameters": {},
"id": "70b5ade4-5c5b-49ac-af15-f8bbb2db9e8d",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
1140,
580
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field\n// called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n item.json.myNewField = 1;\n}\n\nreturn $input.all();"
},
"id": "7decab9b-5efd-417e-a275-3c9bf283df03",
"name": "Code",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
1360,
580
]
}
],
"pinData": {},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "2fc06ad6-b981-484c-97d2-9dda819ee6cd",
"id": "17",
"meta": {
"instanceId": "f21f3ab16fb83938bb58bdb6512c7fe42a006f6d47aa702af6693d9df47facc8"
},
"tags": []
}
{
"name": "My workflow",
"nodes": [
{
"parameters": {},
"id": "70b5ade4-5c5b-49ac-af15-f8bbb2db9e8d",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
1140,
580
]
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field\n// called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n item.json.myNewField = 1;\n}\n\nreturn $input.all();"
},
"id": "7decab9b-5efd-417e-a275-3c9bf283df03",
"name": "Code",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
1360,
580
]
}
],
"pinData": {},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "2fc06ad6-b981-484c-97d2-9dda819ee6cd",
"id": "999999",
"meta": {
"instanceId": "f21f3ab16fb83938bb58bdb6512c7fe42a006f6d47aa702af6693d9df47facc8"
},
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment