Compare commits

..

No commits in common. "e6a22f64ac33cdd2803bfcc176ae7fa235d5c11c" and "db94a35f89e607ff72d6916f30d810c392a1e0c7" have entirely different histories.

1 changed files with 207 additions and 101 deletions

View File

@ -5,7 +5,7 @@
"main": [ "main": [
[ [
{ {
"node": "Set1", "node": "In Billbee Format umwandeln",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
@ -25,17 +25,18 @@
}, },
"PDF": { "PDF": {
"main": [ "main": [
[], [
{
"node": "Dokumente hochladen",
"type": "main",
"index": 0
}
],
[ [
{ {
"node": "Auftragsdaten CSV einlesen", "node": "Auftragsdaten CSV einlesen",
"type": "main", "type": "main",
"index": 0 "index": 0
},
{
"node": "Ins Archiv verschieben",
"type": "main",
"index": 0
} }
] ]
] ]
@ -62,17 +63,6 @@
] ]
] ]
}, },
"Set1": {
"main": [
[
{
"node": "Bestellung an Billbee senden",
"type": "main",
"index": 0
}
]
]
},
"Rückmeldung CSV erzeugen": { "Rückmeldung CSV erzeugen": {
"main": [ "main": [
[ [
@ -84,22 +74,71 @@
] ]
] ]
}, },
"Webhook": { "In Ausgabeformat umwandeln": {
"main": [ "main": [
[ [
{ {
"node": "Code1", "node": "Rückmeldung CSV erzeugen",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
] ]
] ]
}, },
"Code1": { "Webhook für Billbee": {
"main": [ "main": [
[ [
{ {
"node": "Rückmeldung CSV erzeugen", "node": "In Ausgabeformat umwandeln",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "FTP",
"type": "main",
"index": 0
},
{
"node": "Execute Command",
"type": "main",
"index": 0
}
]
]
},
"In Billbee Format umwandeln": {
"main": [
[
{
"node": "Bestellung an Billbee senden",
"type": "main",
"index": 0
}
]
]
},
"Bestellung an Billbee senden": {
"main": [
[
{
"node": "Ins Archiv verschieben",
"type": "main",
"index": 0
}
]
]
},
"Dokumente hochladen": {
"main": [
[
{
"node": "Ins Archiv verschieben1",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
@ -122,8 +161,8 @@
"type": "n8n-nodes-base.ftp", "type": "n8n-nodes-base.ftp",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
400, 660,
-180 460
], ],
"credentials": { "credentials": {
"sftp": { "sftp": {
@ -154,31 +193,28 @@
"type": "n8n-nodes-base.set", "type": "n8n-nodes-base.set",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
380, 900,
180 220
] ]
}, },
{ {
"parameters": { "parameters": {
"authentication": "basicAuth", "authentication": "basicAuth",
"requestMethod": "POST", "requestMethod": "POST",
"url": "=https://app.billbee.io/api/v1/orders?shopId={{$node[\"Billbee ShopID + Token\"].parameter[\"values\"][\"string\"][0][\"value\"]}}", "url": "https://app.billbee.io/api/v1/orders?shopId=97989",
"options": {}, "jsonParameters": true,
"headerParametersUi": { "options": {
"parameter": [ "fullResponse": false
{ },
"name": "={{$node[\"Billbee ShopID + Token\"].parameter[\"values\"][\"string\"][1][\"name\"]}}", "bodyParametersJson": "={{$json}}",
"value": "=2855BE2C-1D67-4AB0-9DEB-3073E6D27B1C" "headerParametersJson": "={\n \"Content-Type\":\"application/json\",\n \"X-Billbee-Api-Key\":\"{{$node[\"Billbee ShopID + Token\"].parameter[\"values\"][\"string\"][1][\"value\"]}}\"\n }"
}
]
}
}, },
"name": "Bestellung an Billbee senden", "name": "Bestellung an Billbee senden",
"type": "n8n-nodes-base.httpRequest", "type": "n8n-nodes-base.httpRequest",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1140, 2020,
180 480
], ],
"id": "c81d1331-8653-4693-ada1-6697dc9ee038", "id": "c81d1331-8653-4693-ada1-6697dc9ee038",
"credentials": { "credentials": {
@ -202,8 +238,8 @@
"type": "n8n-nodes-base.spreadsheetFile", "type": "n8n-nodes-base.spreadsheetFile",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1260, 900,
620 740
] ]
}, },
{ {
@ -218,8 +254,8 @@
"type": "n8n-nodes-base.spreadsheetFile", "type": "n8n-nodes-base.spreadsheetFile",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1160, 1440,
-160 480
] ]
}, },
{ {
@ -231,8 +267,8 @@
"type": "n8n-nodes-base.executeCommand", "type": "n8n-nodes-base.executeCommand",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
180, 660,
180 220
] ]
}, },
{ {
@ -252,8 +288,8 @@
"type": "n8n-nodes-base.if", "type": "n8n-nodes-base.if",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
840, 1120,
-180 460
] ]
}, },
{ {
@ -266,8 +302,8 @@
"type": "n8n-nodes-base.ftp", "type": "n8n-nodes-base.ftp",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
620, 900,
-180 460
], ],
"credentials": { "credentials": {
"sftp": { "sftp": {
@ -276,6 +312,97 @@
} }
} }
}, },
{
"parameters": {
"protocol": "sftp",
"operation": "rename",
"oldPath": "={{$node[\"PDF\"].binary.data.directory}}/{{$node[\"PDF\"].binary.data.fileName}}",
"newPath": "=/archiv/{{$node[\"PDF\"].binary.data.fileName}}",
"options": {}
},
"id": "8e265faa-72f6-4d78-92f2-d946aa866f2f",
"name": "Ins Archiv verschieben",
"type": "n8n-nodes-base.ftp",
"typeVersion": 1,
"position": [
2340,
480
],
"credentials": {
"sftp": {
"id": "1",
"name": "SFTP MyToys"
}
}
},
{
"parameters": {
"protocol": "sftp",
"operation": "upload",
"path": "=/in/{{$binary.data.fileName}}"
},
"id": "cd13302a-3bcf-4fdf-88a5-1ef5a40a725f",
"name": "FTP2",
"type": "n8n-nodes-base.ftp",
"typeVersion": 1,
"position": [
1140,
740
],
"credentials": {
"sftp": {
"id": "1",
"name": "SFTP MyToys"
}
}
},
{
"parameters": {
"jsCode": "let lines = [];\n\nfor (const item of $input.all()) {\n let parcel_type;\n switch(item.json.query.id) {\n case \"Eurocourier\":\n parcel_type = \"EC_STD_NATIONAL\";\n break;\n case \"GLS\":\n parcel_type = \"GLS_STD_NATIONAL\";\n break;\n default:\n parcel_type = \"DPD_STD_NATIONAL\";\n}\n let line = {\n \"TB_ORDER_ID\": item.json.query.id,\n \"ORDER_PAID\" : 0,\n \"TYPE\" : item.json.query.type,\n \"PARCEL_TYPE\": parcel_type,\n \"SHIP_CODE\" : item.json.query.shipment,\n \"COMMENT_INTERN\" : \"\",\n \"COMMENT\" : \"\",\n }; \n lines.push(line);\n}\n\nreturn lines;"
},
"id": "3f76d0dd-3525-4cdb-baab-e2205621ec39",
"name": "In Ausgabeformat umwandeln",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
660,
740
]
},
{
"parameters": {
"path": "1730d70c-f532-4b6f-a20e-e2fc7edb2d45",
"options": {}
},
"id": "5a16780d-19a1-4967-8710-9225ddc59ddf",
"name": "Webhook für Billbee",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
420,
740
],
"webhookId": "1730d70c-f532-4b6f-a20e-e2fc7edb2d45"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"id": "47aa99b1-e403-47c1-a8d9-f6d10c2ec553",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
420,
460
]
},
{ {
"parameters": { "parameters": {
"keepOnlySet": true, "keepOnlySet": true,
@ -393,7 +520,7 @@
"number": [ "number": [
{ {
"name": "PaymentMethod", "name": "PaymentMethod",
"value": "3" "value": 26
}, },
{ {
"name": "Customer.Id", "name": "Customer.Id",
@ -402,6 +529,10 @@
{ {
"name": "Customer.Number", "name": "Customer.Number",
"value": 20089 "value": 20089
},
{
"name": "State",
"value": 3
} }
] ]
}, },
@ -410,29 +541,29 @@
} }
}, },
"id": "50b02a14-bac8-4748-be52-d2e789633254", "id": "50b02a14-bac8-4748-be52-d2e789633254",
"name": "Set1", "name": "In Billbee Format umwandeln",
"type": "n8n-nodes-base.set", "type": "n8n-nodes-base.set",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
860, 1720,
180 480
] ]
}, },
{ {
"parameters": { "parameters": {
"protocol": "sftp", "protocol": "sftp",
"operation": "rename", "operation": "rename",
"oldPath": "={{$binary.data.directory}}/{{$binary.data.fileName}}", "oldPath": "=/out/{{$json[\"name\"]}}",
"newPath": "=/archiv/{{$binary.data.fileName}}", "newPath": "=/archiv/{{$json[\"name\"]}}",
"options": {} "options": {}
}, },
"id": "8e265faa-72f6-4d78-92f2-d946aa866f2f", "id": "e3fe469c-7ee9-4435-8cff-7ad964fe3b02",
"name": "Ins Archiv verschieben", "name": "Ins Archiv verschieben1",
"type": "n8n-nodes-base.ftp", "type": "n8n-nodes-base.ftp",
"typeVersion": 1, "typeVersion": 1,
"position": [ "position": [
1160, 1720,
-360 220
], ],
"credentials": { "credentials": {
"sftp": { "sftp": {
@ -443,57 +574,32 @@
}, },
{ {
"parameters": { "parameters": {
"protocol": "sftp", "binaryData": true,
"operation": "upload", "name": "={{$binary.data.fileName}}",
"path": "=/in/{{$binary.data.fileName}}" "parents": [
}, "0AFGOvDYEtp0yUk9PVA"
"id": "cd13302a-3bcf-4fdf-88a5-1ef5a40a725f", ],
"name": "FTP2",
"type": "n8n-nodes-base.ftp",
"typeVersion": 1,
"position": [
1620,
620
],
"credentials": {
"sftp": {
"id": "1",
"name": "SFTP MyToys"
}
}
},
{
"parameters": {
"path": "1730d70c-f532-4b6f-a20e-e2fc7edb2d45",
"options": {} "options": {}
}, },
"id": "5a16780d-19a1-4967-8710-9225ddc59ddf", "id": "101e2897-0ec5-4401-90d4-1ee5e4b96e14",
"name": "Webhook", "name": "Dokumente hochladen",
"type": "n8n-nodes-base.webhook", "type": "n8n-nodes-base.googleDrive",
"typeVersion": 1, "typeVersion": 2,
"position": [ "position": [
1660, 1440,
180 220
], ],
"webhookId": "1730d70c-f532-4b6f-a20e-e2fc7edb2d45" "credentials": {
}, "googleDriveOAuth2Api": {
{ "id": "9",
"parameters": { "name": "Google Drive account"
"jsCode": "let lines = [];\n\nfor (const item of $input.all()) {\n let parcel_type;\n switch(item.json.query.id) {\n case \"Eurocourier\":\n parcel_type = \"EC_STD_NATIONAL\";\n break;\n case \"GLS\":\n parcel_type = \"GLS_STD_NATIONAL\";\n break;\n default:\n parcel_type = \"DPD_STD_NATIONAL\";\n}\n let line = {\n \"TB_ORDER_ID\": item.json.query.id,\n \"ORDER_PAID\" : 0,\n \"TYPE\" : item.json.query.type,\n \"PARCEL_TYPE\": parcel_type,\n \"SHIP_CODE\" : item.json.query.shipment,\n \"COMMENT_INTERN\" : \"\",\n \"COMMENT\" : \"\",\n }; \n lines.push(line);\n}\n\nreturn lines;" }
}, }
"id": "3f76d0dd-3525-4cdb-baab-e2205621ec39",
"name": "Code1",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
1880,
180
]
} }
], ],
"pinData": {}, "pinData": {},
"settings": {}, "settings": {},
"staticData": null, "staticData": null,
"tags": [], "tags": [],
"updatedAt": "2023-01-23T16:29:54.307Z" "updatedAt": "2023-01-24T06:49:22.307Z"
} }