Hello,
I’m freelance and looking fo for someone to help me with 2 main workflows.
The first one is for Shopify orders.
The main goal is to send a json file to an FTP
I added some code just for example.
The second one is for Shopify inventory.
I have to upload a file from FTP then update quantity in shopify (but I have to sum quantity of items with same barcode)
{
"name": "ORDER -AI",
"nodes": [
{
"parameters": {
"content": "## JSON > Google Sheets",
"height": 80,
"width": 320
},
"name": "Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
620,
600
],
"typeVersion": 1,
"id": "40b99119-32de-4bd8-bf94-56c905472511"
},
{
"parameters": {
"content": "## CSV > JSON file",
"height": 80,
"width": 320
},
"name": "Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-340,
1280
],
"typeVersion": 1,
"id": "a3b27ee8-60b6-494d-8615-afc608b1658c"
},
{
"parameters": {
"content": "## JSON file > Google Sheets",
"height": 80,
"width": 320
},
"name": "Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
60,
1520
],
"typeVersion": 1,
"id": "740dc9cd-413a-4710-8fc5-8c8232e83d4a"
},
{
"parameters": {
"url": "={{ $json[\"Header\"] }}",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "shopifyAccessTokenApi",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
}
},
"id": "d5b17be3-12c2-4ee8-96ca-ad821984f62d",
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
60,
1560
],
"credentials": {
"shopifyAccessTokenApi": {
"id": "2",
"name": "Shopify Access Token account"
}
}
},
{
"parameters": {
"url": "https://tutto-a-vista.myshopify.com/admin/api/2023-01/orders.json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "shopifyAccessTokenApi",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "status",
"value": "open"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true
}
}
}
},
"id": "7a0982a9-4379-4af0-9b6c-005aa278988b",
"name": "HTTP Request2",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
-360,
940
],
"credentials": {
"shopifyAccessTokenApi": {
"id": "2",
"name": "Shopify Access Token account"
}
}
},
{
"parameters": {
"fieldToSplitOut": "clients",
"options": {}
},
"id": "c8446b5d-13f3-4441-9514-7c5d4c15452d",
"name": "SPLIT CLIENTS",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
20,
920
]
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"id": "e2284f2a-b736-4a39-ba2d-926868a6f929",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
-560,
940
]
},
{
"parameters": {
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "1zelgL9tVvtH74o2PwQxMSKIAjDE-21TTfKw1HgpZgxY",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": 629480631,
"mode": "list",
"cachedResultName": "n8n-sheet",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zelgL9tVvtH74o2PwQxMSKIAjDE-21TTfKw1HgpZgxY/edit#gid=629480631"
},
"dataMode": "autoMapInputData",
"columnToMatchOn": "Nome prodotto",
"options": {}
},
"id": "3883f12b-8efd-4a52-bf6b-ccc208d132fe",
"name": "MASTERFILE LAC",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 3,
"position": [
1540,
1680
],
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "3",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "clients",
"value": "={{ $json[\"body\"][\"orders\"] }}"
}
]
},
"options": {}
},
"id": "7972f95b-226e-4b1a-8671-3f138f803ce6",
"name": "SELEZIONA GLI ORDINI",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
-160,
960
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "items",
"value": "={{ $json[\"line_items\"] }}"
},
{
"name": "id ordine",
"value": "={{ $json[\"id\"] }}"
}
]
},
"options": {
"dotNotation": false
}
},
"id": "d23d1a24-398e-4cce-bbee-1330c39a76b9",
"name": "PRODOTTI",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
240,
1020
]
},
{
"parameters": {
"mode": "combine",
"combinationMode": "multiplex",
"options": {}
},
"id": "4ec4be07-0c44-4d69-9556-7b33299b2a7a",
"name": "Merge2",
"type": "n8n-nodes-base.merge",
"typeVersion": 2,
"position": [
1300,
600
]
},
{
"parameters": {
"fieldToSplitOut": "items",
"include": "allOtherFields",
"options": {}
},
"id": "f6888272-cd68-46cb-9f70-8ded643d5390",
"name": "Item Lists1",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
460,
1020
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1Q4pxlMmiT_27exXqmQsm8-goA2IKUllrDnQkpeL6ddI",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": 946951997,
"mode": "list",
"cachedResultName": "Foglio1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Q4pxlMmiT_27exXqmQsm8-goA2IKUllrDnQkpeL6ddI/edit#gid=946951997"
},
"filtersUI": {
"values": [
{
"lookupColumn": "Shopify ID",
"lookupValue": "={{ $json[\"items\"][\"product_id\"] }}"
}
]
},
"options": {}
},
"id": "4c227267-8750-4d17-97d5-708079b0982f",
"name": "tutti i prodotti",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 3,
"position": [
600,
1340
],
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "3",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"mode": "combine",
"mergeByFields": {
"values": [
{
"field1": "Shopify ID",
"field2": "items.product_id"
}
]
},
"options": {}
},
"id": "26468fdd-538e-464f-bf16-e9ede11a94af",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 2,
"position": [
660,
1020
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "Product Title",
"value": "={{ $json[\"Product Title\"] }}"
},
{
"name": "ArticleCode",
"value": "={{ $json[\"First Variant - Barcode\"] }}"
},
{
"name": "Quantity",
"value": "={{ $json[\"items\"][\"quantity\"] }}"
},
{
"name": "PricePerUnit",
"value": "={{ $json[\"items\"][\"price_set\"][\"shop_money\"][\"amount\"] }}"
},
{
"name": "IVA",
"value": "={{ $json[\"items\"][\"tax_lines\"][0][\"rate\"] }}"
},
{
"name": "VenDate"
}
]
},
"options": {}
},
"id": "8eaff437-f7e8-4762-a28b-0e6662dce3cf",
"name": "Set1",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1160,
820
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json[\"First Variant - Barcode\"] }}"
}
]
}
},
"id": "b70c40bc-83d2-456a-a887-84df6a317dcb",
"name": "IF1",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
860,
980
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "id items",
"value": "={{ $json[\"Shopify ID\"] }}"
},
{
"name": "Barcode",
"value": "={{ $json[\"First Variant - Barcode\"] }}"
},
{
"name": "Nome prodotto",
"value": "={{ $json[\"items\"][\"name\"] }}"
},
{
"name": "id prodotto",
"value": "={{ $json[\"items\"][\"product_id\"] }}"
},
{
"name": "Quantity",
"value": "={{ $json[\"items\"][\"quantity\"] }}"
},
{
"name": "PricePerUnit",
"value": "={{ $json[\"items\"][\"price\"] }}"
},
{
"name": "IVA",
"value": "={{ $json[\"items\"][\"tax_lines\"][0][\"rate\"] }}"
},
{
"name": "Sku",
"value": "={{ $json[\"items\"][\"sku\"] }}"
},
{
"name": "id ordine",
"value": "={{ $json[\"id ordine\"] }}"
},
{
"name": "Sfera",
"value": "={{ $json[\"items\"][\"properties\"][0][\"value\"] }} "
},
{
"name": "Diametro",
"value": "= {{ $json[\"items\"][\"properties\"][3][\"value\"] }}"
},
{
"name": "Raggio (BC)",
"value": "={{ $json[\"items\"][\"properties\"][4][\"value\"] }}"
},
{
"name": "Cilindro",
"value": "={{ $json[\"items\"][\"properties\"][1][\"value\"] }}"
},
{
"name": "Assi",
"value": "={{ $json[\"items\"][\"properties\"][2][\"value\"] }}"
}
]
},
"options": {
"dotNotation": true
}
},
"id": "71ecc0b9-0b7c-4d2c-9208-26d7349aa94c",
"name": "LAC",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1160,
1060
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1zelgL9tVvtH74o2PwQxMSKIAjDE-21TTfKw1HgpZgxY",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": 629480631,
"mode": "list",
"cachedResultName": "n8n-sheet",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zelgL9tVvtH74o2PwQxMSKIAjDE-21TTfKw1HgpZgxY/edit#gid=629480631"
},
"filtersUI": {
"values": [
{
"lookupColumn": "Nome prodotto",
"lookupValue": "={{ $json[\"Nome prodotto\"] }} "
},
{
"lookupColumn": "Sku",
"lookupValue": "={{ $json[\"Sku\"] }}"
}
]
},
"options": {}
},
"id": "211c8853-989d-40e2-85d6-81a2d0da5aae",
"name": "MASTERFILE LAC1",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 3,
"position": [
1720,
1660
],
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "3",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"operation": "toFile",
"fileFormat": "csv",
"options": {
"fileName": "users_spreadsheet"
}
},
"id": "5abc1325-b86f-42c6-909b-ae4551f58150",
"name": "Spreadsheet File",
"type": "n8n-nodes-base.spreadsheetFile",
"typeVersion": 1,
"position": [
1720,
620
]
},
{
"parameters": {
"options": {}
},
"id": "7b7eff05-0a68-40d9-9a2d-94854b85d884",
"name": "Spreadsheet File1",
"type": "n8n-nodes-base.spreadsheetFile",
"typeVersion": 1,
"position": [
1900,
620
]
},
{
"parameters": {
"mode": "jsonToBinary",
"options": {}
},
"id": "4719d94b-8a85-4389-aa88-8ffd8a9ff399",
"name": "Move Binary Data",
"type": "n8n-nodes-base.moveBinaryData",
"typeVersion": 1,
"position": [
1900,
820
]
},
{
"parameters": {
"fileName": "/Users/manue/spreadsheet.json",
"options": {}
},
"name": "Write Binary File",
"type": "n8n-nodes-base.writeBinaryFile",
"position": [
1720,
820
],
"typeVersion": 1,
"id": "46e38647-0cc6-4095-8ba1-360d7234d9b0"
},
{
"parameters": {
"operation": "upload",
"path": "/html/ecomm_sale.json"
},
"id": "87524e57-73e5-41db-b1c8-b8284fa56bb5",
"name": "FTP",
"type": "n8n-nodes-base.ftp",
"typeVersion": 1,
"position": [
1580,
800
],
"credentials": {
"ftp": {
"id": "5",
"name": "FTP account"
}
}
},
{
"parameters": {
"mode": "combine",
"mergeByFields": {
"values": [
{
"field1": "id ordine",
"field2": "id ordine"
}
]
},
"joinMode": "keepEverything",
"options": {}
},
"id": "06f920ef-339a-4095-bab9-c52000373e4d",
"name": "Merge3",
"type": "n8n-nodes-base.merge",
"typeVersion": 2,
"position": [
1840,
1080
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1zelgL9tVvtH74o2PwQxMSKIAjDE-21TTfKw1HgpZgxY",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": 195923314,
"mode": "list",
"cachedResultName": "TUTTI",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1zelgL9tVvtH74o2PwQxMSKIAjDE-21TTfKw1HgpZgxY/edit#gid=195923314"
},
"filtersUI": {
"values": [
{
"lookupColumn": "SITO",
"lookupValue": "={{ $json[\"Nome prodotto\"] }} "
},
{
"lookupColumn": "SKU",
"lookupValue": "={{ $json[\"Sku\"] }}"
},
{
"lookupColumn": "Diametro",
"lookupValue": "={{ $json[\"Raggio (BC)\"] }}"
},
{
"lookupColumn": "Cilindro",
"lookupValue": "={{ $json[\"Cilindro\"] }}"
},
{
"lookupColumn": "Asse",
"lookupValue": "={{ $json[\"Assi\"] }}"
},
{
"lookupColumn": "Diametro",
"lookupValue": "={{ $json[\"Diametro\"] }}"
},
{
"lookupColumn": "Sfera",
"lookupValue": "={{ $json[\"Sfera\"] }}"
}
]
},
"options": {}
},
"id": "5bf7b616-c4d7-4d5d-a51a-2cf843f7cab0",
"name": "MASTERFILE LAC2",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 3,
"position": [
1880,
1660
],
"alwaysOutputData": false,
"credentials": {
"googleSheetsOAuth2Api": {
"id": "3",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"fieldToSplitOut": "id items",
"options": {}
},
"id": "8eb26753-b6a3-428f-8188-f895a503f4f9",
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
1280,
1240
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "id ordine",
"value": "={{ $json[\"id\"] }}"
},
{
"name": "Name",
"value": "={{ $json[\"customer\"][\"first_name\"] }}"
},
{
"name": "Surname",
"value": "={{ $json[\"customer\"][\"last_name\"] }}"
},
{
"name": "Phone",
"value": "={{ $json[\"customer\"][\"default_address\"][\"phone\"] }}"
},
{
"name": "Email",
"value": "={{ $json[\"customer\"][\"email\"] }}"
},
{
"name": "Vat",
"value": "={{ $json[\"note_attributes\"][2][\"value\"] }}"
},
{
"name": "BirthDate",
"value": " "
},
{
"name": "Sex",
"value": " "
},
{
"name": "DeliveryAddress",
"value": "={{ $json[\"shipping_address\"][\"address1\"] }}"
},
{
"name": "DeliveryCity",
"value": "={{ $json[\"shipping_address\"][\"city\"] }}"
},
{
"name": "DeliveryProvince",
"value": "={{ $json[\"shipping_address\"][\"province_code\"] }}"
},
{
"name": "DeliveryCountry",
"value": "={{ $json[\"shipping_address\"][\"country_code\"] }}"
},
{
"name": "InvoiceAddress",
"value": "={{ $json[\"billing_address\"][\"address1\"] }}"
},
{
"name": "InvoiceZIP",
"value": "={{ $json[\"billing_address\"][\"zip\"] }}"
},
{
"name": "InvoiceCity",
"value": "={{ $json[\"billing_address\"][\"city\"] }}"
},
{
"name": "InvoiceProvince",
"value": "={{ $json[\"billing_address\"][\"province_code\"] }}"
},
{
"name": "InvoiceCountry",
"value": "={{ $json[\"billing_address\"][\"country_code\"] }}"
},
{
"name": "Mobile",
"value": "={{ $json[\"customer\"][\"default_address\"][\"phone\"] }}"
},
{
"name": "Privacy",
"value": "true"
},
{
"name": "Marketing",
"value": "={{ $json[\"buyer_accepts_marketing\"] }}"
},
{
"name": "Profiling",
"value": "={{ $json[\"buyer_accepts_marketing\"] }}"
},
{
"name": "items id",
"value": "={{ $json[\"line_items\"][0][\"id\"] }}"
},
{
"name": "Updated At",
"value": "={{ $json[\"updated_at\"] }}"
},
{
"name": "Created At",
"value": "={{ $json[\"created_at\"] }}"
},
{
"name": "Tags",
"value": "={{ $json[\"tags\"] }}"
},
{
"name": "Nome prodotto",
"value": "={{ $json[\"line_items\"][0][\"title\"] }}"
},
{
"name": "admin_graphql_api_id",
"value": "={{ $json[\"admin_graphql_api_id\"] }}"
}
]
},
"options": {}
},
"id": "cab56a23-7876-47dd-a894-23156136a679",
"name": "Set8",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
240,
800
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "Name",
"value": "={{ $json[\"Name\"] }}"
},
{
"name": "Surname",
"value": "={{ $json[\"Surname\"] }}"
},
{
"name": "Phone",
"value": "={{ $json[\"Phone\"] }}"
},
{
"name": "Email",
"value": "={{ $json[\"Email\"] }}"
},
{
"name": "Vat",
"value": "={{ $json[\"note_attributes\"][2][\"value\"] }}"
},
{
"name": "BirthDate",
"value": " "
},
{
"name": "Sex",
"value": " "
},
{
"name": "DeliveryAddress",
"value": "={{ $json[\"DeliveryAddress\"] }}"
},
{
"name": "DeliveryCity",
"value": "={{ $json[\"DeliveryCity\"] }}"
},
{
"name": "DeliveryProvince",
"value": "={{ $json[\"DeliveryProvince\"] }}"
},
{
"name": "DeliveryCountry",
"value": "={{ $json[\"DeliveryCountry\"] }}"
},
{
"name": "InvoiceAddress",
"value": "={{ $json[\"InvoiceAddress\"] }}"
},
{
"name": "InvoiceZIP",
"value": "={{ $json[\"InvoiceZIP\"] }}"
},
{
"name": "InvoiceCity",
"value": "={{ $json[\"InvoiceCity\"] }}"
},
{
"name": "InvoiceProvince",
"value": "={{ $json[\"InvoiceProvince\"] }}"
},
{
"name": "InvoiceCountry",
"value": "={{ $json[\"InvoiceCountry\"] }}"
},
{
"name": "Mobile",
"value": "={{ $json[\"Mobile\"] }}"
},
{
"name": "Privacy",
"value": "true"
},
{
"name": "Marketing",
"value": "={{ $json[\"Marketing\"] }}"
},
{
"name": "Profiling",
"value": "={{ $json[\"Profiling\"] }}"
},
{
"name": "ArticleCode",
"value": "={{ $json[\"ArticleCode\"] }}"
},
{
"name": "=Quantity",
"value": "={{ $json[\"Quantity\"] }}"
},
{
"name": "PricePerUnit",
"value": "={{ $json[\"PricePerUnit\"] }}"
},
{
"name": "IVA",
"value": "={{ $json[\"IVA\"] }}"
},
{
"name": "VenDate",
"value": "={{ $json[\"Created At\"] }}"
}
]
},
"options": {}
},
"id": "dcbd553a-9251-49fe-9209-6b9630afdc00",
"name": "Set9",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1520,
620
]
}
],
"pinData": {},
"connections": {
"HTTP Request2": {
"main": [
[
{
"node": "SELEZIONA GLI ORDINI",
"type": "main",
"index": 0
}
]
]
},
"SPLIT CLIENTS": {
"main": [
[
{
"node": "PRODOTTI",
"type": "main",
"index": 0
},
{
"node": "Set8",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "HTTP Request2",
"type": "main",
"index": 0
}
]
]
},
"SELEZIONA GLI ORDINI": {
"main": [
[
{
"node": "SPLIT CLIENTS",
"type": "main",
"index": 0
}
]
]
},
"PRODOTTI": {
"main": [
[
{
"node": "Item Lists1",
"type": "main",
"index": 0
}
]
]
},
"Item Lists1": {
"main": [
[
{
"node": "tutti i prodotti",
"type": "main",
"index": 0
},
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"tutti i prodotti": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "IF1",
"type": "main",
"index": 0
}
]
]
},
"Set1": {
"main": [
[
{
"node": "Merge2",
"type": "main",
"index": 1
}
]
]
},
"IF1": {
"main": [
[
{
"node": "LAC",
"type": "main",
"index": 0
}
],
[
{
"node": "Set1",
"type": "main",
"index": 0
}
]
]
},
"Merge2": {
"main": [
[
{
"node": "Set9",
"type": "main",
"index": 0
}
]
]
},
"Spreadsheet File": {
"main": [
[
{
"node": "Spreadsheet File1",
"type": "main",
"index": 0
}
]
]
},
"Spreadsheet File1": {
"main": [
[
{
"node": "Move Binary Data",
"type": "main",
"index": 0
}
]
]
},
"Move Binary Data": {
"main": [
[
{
"node": "Write Binary File",
"type": "main",
"index": 0
}
]
]
},
"Write Binary File": {
"main": [
[
{
"node": "FTP",
"type": "main",
"index": 0
}
]
]
},
"LAC": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"MASTERFILE LAC": {
"main": [
[
{
"node": "MASTERFILE LAC1",
"type": "main",
"index": 0
}
]
]
},
"MASTERFILE LAC1": {
"main": [
[
{
"node": "Merge3",
"type": "main",
"index": 1
},
{
"node": "MASTERFILE LAC2",
"type": "main",
"index": 0
}
]
]
},
"Set8": {
"main": [
[
{
"node": "Merge3",
"type": "main",
"index": 0
},
{
"node": "Merge2",
"type": "main",
"index": 0
}
]
]
},
"Set9": {
"main": [
[
{
"node": "Spreadsheet File",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "c88cedbd-5171-463b-8d45-935b8e1514b6",
"id": 24,
"meta": {
"instanceId": "abc0280f5fc2efd7d84f033024324434d2c37549eefd4332298805835d30d1f2"
},
"tags": []
}```