Compare commits

...

2 Commits

Author SHA1 Message Date
m3tam3re f344721a9e [N8N Backup] Billbee Aufträge -> Data Warehouse.json (different) 2023-12-12 12:00:21 +01:00
m3tam3re 19f8f0ecff [N8N Backup] Rechnungen -> DATEV.json (different) 2023-12-12 12:00:18 +01:00
2 changed files with 110 additions and 76 deletions

View File

@ -34,17 +34,6 @@
] ]
] ]
}, },
"Item Lists1": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"Split Response Into Orders": { "Split Response Into Orders": {
"main": [ "main": [
[ [
@ -54,9 +43,9 @@
"index": 0 "index": 0
}, },
{ {
"node": "Code", "node": "Merge",
"type": "main", "type": "main",
"index": 0 "index": 1
} }
] ]
] ]
@ -65,18 +54,7 @@
"main": [ "main": [
[ [
{ {
"node": "Item Lists1", "node": "Set Platform Ids",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Crypto",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
@ -84,6 +62,39 @@
] ]
}, },
"Crypto": { "Crypto": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Upsert Customer": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Crypto",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [ "main": [
[ [
{ {
@ -93,6 +104,17 @@
} }
] ]
] ]
},
"Set Platform Ids": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
} }
}, },
"createdAt": "2023-12-11T17:25:14.909Z", "createdAt": "2023-12-11T17:25:14.909Z",
@ -239,7 +261,7 @@
"type": "n8n-nodes-base.postgres", "type": "n8n-nodes-base.postgres",
"typeVersion": 2.3, "typeVersion": 2.3,
"position": [ "position": [
1580, 2020,
-1320 -1320
], ],
"credentials": { "credentials": {
@ -301,8 +323,8 @@
"type": "n8n-nodes-base.postgres", "type": "n8n-nodes-base.postgres",
"typeVersion": 2.3, "typeVersion": 2.3,
"position": [ "position": [
1300, 300,
-1740 -1480
], ],
"credentials": { "credentials": {
"postgres": { "postgres": {
@ -328,21 +350,7 @@
"type": "n8n-nodes-base.if", "type": "n8n-nodes-base.if",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1320, 1760,
-1300
]
},
{
"parameters": {
"fieldToSplitOut": "OrderItems",
"options": {}
},
"id": "48b91734-2dec-494e-8a8b-d260e5a5ff40",
"name": "Item Lists1",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 3,
"position": [
1100,
-1300 -1300
] ]
}, },
@ -377,10 +385,11 @@
"columns": { "columns": {
"mappingMode": "defineBelow", "mappingMode": "defineBelow",
"value": { "value": {
"order_id": 0, "order_id": "={{ $json.order_hash }}",
"order_date": 0, "order_ref": "={{ $json.OrderNumber }}",
"customer_id": 0, "order_date": "={{ $json.CreatedAt.toDate().format(\"yyyyMMdd\") }}",
"platform_id": 0 "customer_id": "={{ $json.Customer.Number }}",
"platform_id": "={{ \nswitch ($json[\"ApiAccountName\"]) {\n case 'Otto':\n $json.platform = 6;\n default:\n $json.platform = 1;\n}\n}}"
}, },
"matchingColumns": [], "matchingColumns": [],
"schema": [ "schema": [
@ -428,6 +437,15 @@
"display": true, "display": true,
"type": "number", "type": "number",
"canBeUsedToMatch": false "canBeUsedToMatch": false
},
{
"id": "md5_hash",
"displayName": "md5_hash",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
} }
] ]
}, },
@ -438,8 +456,8 @@
"type": "n8n-nodes-base.postgres", "type": "n8n-nodes-base.postgres",
"typeVersion": 2.3, "typeVersion": 2.3,
"position": [ "position": [
840, 1120,
-1300 -1320
], ],
"credentials": { "credentials": {
"postgres": { "postgres": {
@ -448,19 +466,6 @@
} }
} }
}, },
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n item.json.myNewField = 1;\n \n}\n\nreturn $input.all();"
},
"id": "ab86ad1c-fa6f-4683-9b51-70dbfdcc1540",
"name": "Code",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
260,
-1480
]
},
{ {
"parameters": { "parameters": {
"value": "={{ $json.OrderNumber.concat($json.CreatedAt.toDate().format(\"yyyy-MM-d\")) }}", "value": "={{ $json.OrderNumber.concat($json.CreatedAt.toDate().format(\"yyyy-MM-d\")) }}",
@ -472,21 +477,50 @@
"type": "n8n-nodes-base.crypto", "type": "n8n-nodes-base.crypto",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
480, 700,
-1480 -1320
] ]
}, },
{ {
"parameters": { "parameters": {
"value": "406-8723903-474272720220101" "mode": "chooseBranch",
"output": "input2"
}, },
"id": "ded21e90-3c0a-4122-87f7-a21a1ed4d998", "id": "8490a7f7-6f11-487b-8f81-4c97f56c638b",
"name": "Crypto1", "name": "Merge",
"type": "n8n-nodes-base.crypto", "type": "n8n-nodes-base.merge",
"typeVersion": 1, "typeVersion": 2.1,
"position": [ "position": [
580, 500,
-1220 -1320
]
},
{
"parameters": {
"language": "python",
"pythonCode": "# Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor item in _input.all():\n\tmatch item.json.Seller.BillbeeShopName:\n\t\tcase 'eBay':\n item.json.platform = 12\n\t\tcase 'lana-kk':\n item.json.platform = 1\n\t\tcase 'Amazon':\n item.json.platform = 2\n\t\tcase 'Weltkarten24':\n item.json.platform = 3\n\t\tcase 'KAUFLAND':\n item.json.platform = 5\n\t\tcase 'Wayfair':\n item.json.platform = 4\n\t\tcase 'Böttcher AG':\n item.json.platform = 7\n\t\tcase 'Juramondo':\n item.json.platform = 9\n\t\tcase 'wild.lanakk.com':\n item.json.platform = 8\n\t\tcase 'Etsy':\n item.json.platform = 10\n\t\tcase 'Otto':\n item.json.platform = 6\n\t\tcase 'weltkarte-kinder':\n item.json.platform = 11\n\t\tcase _:\n item.json.platform = 1\nreturn _input.all()\n"
},
"id": "2006b054-3147-4f8a-b8d1-6ce19554dfde",
"name": "Code",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
920,
-1320
]
},
{
"parameters": {
"fieldToSplitOut": "OrderItems",
"options": {}
},
"id": "48b91734-2dec-494e-8a8b-d260e5a5ff40",
"name": "Set Platform Ids",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 3,
"position": [
1320,
-1320
] ]
} }
], ],
@ -497,6 +531,6 @@
"staticData": null, "staticData": null,
"tags": [], "tags": [],
"triggerCount": 0, "triggerCount": 0,
"updatedAt": "2023-12-11T19:07:26.000Z", "updatedAt": "2023-12-12T09:52:19.000Z",
"versionId": "617ecfde-b568-4cbc-8c1c-a8ee328a2882" "versionId": "0e731bc6-faf1-4e5e-a83e-f8dabe7f704d"
} }

View File

@ -474,13 +474,13 @@
"staticData": { "staticData": {
"node:Gmail Trigger": { "node:Gmail Trigger": {
"possibleDuplicates": [ "possibleDuplicates": [
"18c59577d913a006" "18c5d25096d07c29"
], ],
"lastTimeChecked": 1702305954 "lastTimeChecked": 1702369757
} }
}, },
"tags": [], "tags": [],
"triggerCount": 1, "triggerCount": 1,
"updatedAt": "2023-12-11T14:46:40.000Z", "updatedAt": "2023-12-12T08:29:37.000Z",
"versionId": "d5336b9a-260a-4f88-862e-edbbb760acb2" "versionId": "d5336b9a-260a-4f88-862e-edbbb760acb2"
} }