📚 add an awesome collection of n8n workflows
This commit is contained in:
56
docs/workflows/update-postgres-rows.json
Normal file
56
docs/workflows/update-postgres-rows.json
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user