mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-29 06:29:42 -08:00
56 lines
1.1 KiB
JSON
56 lines
1.1 KiB
JSON
|
{
|
||
|
"nodes": [
|
||
|
{
|
||
|
"parameters": {},
|
||
|
"name": "Start",
|
||
|
"type": "n8n-nodes-base.start",
|
||
|
"typeVersion": 1,
|
||
|
"position": [
|
||
|
250,
|
||
|
300
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"parameters": {
|
||
|
"functionCode": "const newItems = [];\nfor (let i=1;i < 6; i++) {\n newItems.push({\n json: {\n id: i,\n name: `New name ${i}`,\n ean: `New EAN ${i}`,\n }\n });\n}\nreturn newItems;"
|
||
|
},
|
||
|
"name": "Function1",
|
||
|
"type": "n8n-nodes-base.function",
|
||
|
"typeVersion": 1,
|
||
|
"position": [
|
||
|
460,
|
||
|
300
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"parameters": {
|
||
|
"operation": "update",
|
||
|
"table": "product",
|
||
|
"columns": "name,ean"
|
||
|
},
|
||
|
"name": "Update Rows",
|
||
|
"type": "n8n-nodes-base.postgres",
|
||
|
"typeVersion": 1,
|
||
|
"position": [
|
||
|
610,
|
||
|
300
|
||
|
],
|
||
|
"credentials": {
|
||
|
"postgres": "postgres"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"connections": {
|
||
|
"Function1": {
|
||
|
"main": [
|
||
|
[
|
||
|
{
|
||
|
"node": "Update Rows",
|
||
|
"type": "main",
|
||
|
"index": 0
|
||
|
}
|
||
|
]
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|