AutomationFlowsData & Sheets › Inventory Abc & Pareto Analysis with Google Sheets for Supply Chain

Inventory Abc & Pareto Analysis with Google Sheets for Supply Chain

Original n8n title: 🔤 Inventory Abc & Pareto Analysis with Google Sheets for Supply Chain

BySamir Saci @samirsaci on n8n.io

*Tags: Supply Chain, Inventory Management, ABC Analysis, Pareto Principle, Demand Variability, Automation, Google Sheets*

Event trigger★★★★☆ complexity17 nodesGoogle Sheets
Data & Sheets Trigger: Event Nodes: 17 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #8618 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "dd09796e-b4c4-43df-8401-bba895d330b3",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1056,
        -400
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5f502423-b87c-4322-aac6-10d07e685087",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -832,
        -400
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "Input Data"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "Data Analytics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "15e8b11a-83d9-41cb-84e4-dbfe0ddf970f",
      "name": "Filter Out Zero Sales",
      "type": "n8n-nodes-base.filter",
      "position": [
        -608,
        -400
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "39ce1523-ed7e-404a-82db-099200bcb82c",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.QTY }}",
              "rightValue": "={{ 0 }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2cd9b9a0-dc4f-4d99-b4c4-43f6d165cad8",
      "name": "Transpose",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        -592
      ],
      "parameters": {
        "jsCode": "const input = $input.all().map(i => i.json);\n\n// Collect store IDs\nconst stores = input.map(row => row.STORE);\n// Collect items (from keys)\nconst items = Object.keys(input[0]).filter(k => k !== \"STORE\");\n\n// Transpose\nconst result = items.map(ITEM => {\n  let row = { ITEM };\n  for (const store of stores) {\n    const storeRow = input.find(r => r.STORE === store);\n    row[store] = storeRow[ITEM];\n  }\n  return { json: row };\n});\n\nreturn result;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "7bedeb08-f47e-4809-9936-7cdc8a9236d1",
      "name": "Daily Sales per Store",
      "type": "n8n-nodes-base.code",
      "position": [
        -384,
        -304
      ],
      "parameters": {
        "jsCode": "const agg = {};\nfor (const {json} of items) {\n  const k = `${json.STORE}|${json.DAY}`;\n  if (!agg[k]) agg[k] = { STORE: json.STORE, DAY: json.DAY, QTY: 0, TO: 0 };\n  agg[k].QTY += Number(json.QTY||0);\n  agg[k].TO  += Number(json.TO||0);\n}\nreturn Object.values(agg).map(r => ({ json: r }));"
      },
      "typeVersion": 2
    },
    {
      "id": "b0134581-ef21-4485-bd75-8a5d7f865ad4",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -160,
        -304
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "59bb6e5b-0765-4812-a842-19a3bc7a0357",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.STORE }}",
              "rightValue": "STORE-1"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "95a2efc7-9c7b-4263-aab4-c00bbe902714",
      "name": "Sales Store 1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        64,
        -400
      ],
      "parameters": {
        "columns": {
          "value": {
            "TO": "={{ $json.TO }}",
            "DAY": "={{ $json.DAY }}",
            "QTY": "={{ $json.QTY }}"
          },
          "schema": [
            {
              "id": "DAY",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "DAY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "QTY",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "QTY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TO",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "TO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 421687347,
          "cachedResultUrl": "",
          "cachedResultName": "Daily Sales Store 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "Data Analytics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "fdffd98a-36ac-425b-861c-b3f738828fe2",
      "name": "Sales Store 2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        64,
        -208
      ],
      "parameters": {
        "columns": {
          "value": {
            "TO": "={{ $json.TO }}",
            "DAY": "={{ $json.DAY }}",
            "QTY": "={{ $json.QTY }}"
          },
          "schema": [
            {
              "id": "DAY",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "DAY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "QTY",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "QTY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TO",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 749936247,
          "cachedResultUrl": "",
          "cachedResultName": "Daily Sales Store 2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "Data Analytics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "8a3afe9e-d873-4a02-9fb1-45fc9c380601",
      "name": "Pareto Analysis",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        -784
      ],
      "parameters": {
        "jsCode": "// Normalize + sort by turnover (TO) desc\nconst rows = items\n  .map(i => ({\n    ...i.json,\n    TO: Number(i.json.TO || 0),   // turnover = QTY x Unit Price\n    QTY: Number(i.json.QTY || 0),\n  }))\n  .sort((a, b) => b.TO - a.TO);\n\nconst n = rows.length;\nconst totalTO = rows.reduce((s, r) => s + r.TO, 0) || 1;\n\nlet cumTO = 0;\nrows.forEach((r, idx) => {\n  cumTO += r.TO;\n  r.cum_turnover = cumTO;                 // absolute cumulative TO\n  r.cum_share = +(cumTO / totalTO).toFixed(6); // 0..1\n  r.sku_rank = idx + 1;\n  r.cum_skus = +((idx + 1) / n).toFixed(6);    // 0..1\n  r.cum_skus_pct = +(r.cum_skus * 100).toFixed(2); // 0..100 for charts\n});\n\n// Return table\nreturn rows.map(r => ({ json: r }));\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "e8e1409d-b571-43b8-ae9e-bb8da228cefd",
      "name": "TO, QTY GroupBy ITEM",
      "type": "n8n-nodes-base.code",
      "position": [
        -384,
        -784
      ],
      "parameters": {
        "jsCode": "const agg = {};\nfor (const {json} of items) {\n  const ITEM = String(json.ITEM);\n  const TO = Number(json.TO);\n  const QTY = Number(json.QTY);\n  if (!agg[ITEM]) agg[ITEM] = { ITEM, TO: 0, QTY: 0 };\n  agg[ITEM].TO += TO;\n  agg[ITEM].QTY += QTY;\n}\nconst rows = Object.values(agg).sort((a,b)=> b.TO - a.TO);\nreturn rows.map(r => ({ json: r }));"
      },
      "typeVersion": 2
    },
    {
      "id": "9e02d5cb-701d-4a40-b2bf-c2fae43af8ef",
      "name": "TO GroupBy (STORE, ITEM)",
      "type": "n8n-nodes-base.code",
      "position": [
        -384,
        -592
      ],
      "parameters": {
        "jsCode": "// Build dictionaries of unique stores & skus\nconst stores = new Set();\nconst skus = new Set();\n// Append dictionnaries with values\nfor (const {json} of items) { stores.add(json.STORE); skus.add(json.ITEM); }\n// List of Unique SKU\nconst skuList = Array.from(skus).sort();\n\n// Accumulate sums\nconst mat = {}; // store_id -> sku -> sum\nfor (const {json} of items) {\n  const s = json.STORE;\n  const k = json.ITEM;\n  const v = Number(json.TO) || 0;\n  if (!mat[s]) mat[s] = {};\n  mat[s][k] = (mat[s][k] || 0) + v;\n}\n\n// Output wide rows with 0 fill\nconst rows = [];\nfor (const s of Array.from(stores).sort()) {\n  const row = { STORE: s };\n  for (const k of skuList) row[k] = mat[s][k] || 0;\n  rows.push(row);\n}\nreturn rows.map(r => ({ json: r }));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "efe6f052-ff5d-4755-ae07-4a7bc480ddbb",
      "name": "Multi-Store Sales",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        64,
        -592
      ],
      "parameters": {
        "columns": {
          "value": {
            "TO": "={{ $json.TO }}",
            "DAY": "={{ $json.DAY }}",
            "QTY": "={{ $json.QTY }}"
          },
          "schema": [
            {
              "id": "DAY",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "DAY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "QTY",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "QTY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TO",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "TO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 421687347,
          "cachedResultUrl": "",
          "cachedResultName": "Daily Sales Store 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "Data Analytics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "5bd88834-9c20-4d9e-bd31-146dc31e2c18",
      "name": "Demand Variability x Sales %",
      "type": "n8n-nodes-base.code",
      "position": [
        -384,
        -16
      ],
      "parameters": {
        "jsCode": "// INPUT items: rows with fields ITEM, DAY, QTY (others optional)\n\nfunction mean(a){ return a.reduce((s,x)=>s + x, 0) / (a.length || 1); }\nfunction stdev_samp(a){\n  if (a.length <= 1) return 0;\n  const m = mean(a);\n  const v = a.reduce((s,x)=> s + (x - m) ** 2, 0) / (a.length - 1);\n  return Math.sqrt(v);\n}\n\n// 1) build daily series per ITEM (sum across stores)\nconst series = {};            // ITEM -> { day -> qty_sum }\nlet totalQty = 0;\n\nfor (const { json } of items) {\n  const item = String(json.ITEM);\n  const day  = String(json.DAY);\n  const qty  = Number(json.QTY || 0);\n\n  if (!series[item]) series[item] = {};\n  series[item][day] = (series[item][day] || 0) + qty;\n  totalQty += qty;\n}\n\n// 2) compute metrics per ITEM\nconst out = [];\nfor (const [item, dayMap] of Object.entries(series)) {\n  const daily = Object.values(dayMap);                 // array of daily qty\n  const qty_total = daily.reduce((s,x)=>s+x, 0);\n  const m = mean(daily);\n  const sd = stdev_samp(daily);\n  const cv = m ? sd / m : null;\n  const share_qty_pct = totalQty ? (qty_total / totalQty) * 100 : 0;\n\n  out.push({\n    ITEM: item,\n    qty_total,\n    share_qty_pct: Number(share_qty_pct.toFixed(2)),\n    mean_qty: Number(m.toFixed(3)),\n    std_qty: Number(sd.toFixed(3)),\n    cv_qty: cv == null ? null : Number(cv.toFixed(3)),\n  });\n}\n\n// Optional: sort by share desc\nout.sort((a,b) => b.share_qty_pct - a.share_qty_pct);\n\n// Return as n8n items\nreturn out.map(r => ({ json: r }));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "805e6a80-bb24-446e-ab9c-a0e0c68f555a",
      "name": "ABC XYZ Analysis",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        64,
        -16
      ],
      "parameters": {
        "columns": {
          "value": {
            "ABC": "={{ $json.ABC }}",
            "ITEM": "={{ $json.ITEM }}",
            "cv_qty": "={{ $json.cv_qty }}",
            "std_qty": "={{ $json.std_qty }}",
            "mean_qty": "={{ $json.mean_qty }}",
            "cum_share": "={{ $json.cum_share }}",
            "qty_total": "={{ $json.qty_total }}",
            "share_qty_pct": "={{ $json.share_qty_pct }}"
          },
          "schema": [
            {
              "id": "ITEM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ITEM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "qty_total",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "qty_total",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "share_qty_pct",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "share_qty_pct",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cv_qty",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "cv_qty",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ABC",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ABC",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "mean_qty",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "mean_qty",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "std_qty",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "std_qty",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cum_share",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "cum_share",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "limit_cov",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "limit_cov",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": false
        },
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1281688243,
          "cachedResultUrl": "",
          "cachedResultName": "ABC XYZ"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "Data Analytics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "fb1b23cb-cad9-4a75-bb41-5d87209b51c5",
      "name": "Update Pareto Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        64,
        -784
      ],
      "parameters": {
        "columns": {
          "value": {
            "TO": "={{ $json.TO }}",
            "QTY": "={{ $json.QTY }}",
            "ITEM": "={{ $json.ITEM }}",
            "cum_skus": "={{ $json.cum_skus }}",
            "sku_rank": "={{ $json.sku_rank }}",
            "cum_share": "={{ $json.cum_share }}",
            "cum_skus_pct": "={{ $json.cum_skus_pct }}",
            "cum_turnover": "={{ $json.cum_turnover }}"
          },
          "schema": [
            {
              "id": "ITEM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ITEM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TO",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "TO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "QTY",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "QTY",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cum_turnover",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "cum_turnover",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cum_share",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "cum_share",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sku_rank",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "sku_rank",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cum_skus",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "cum_skus",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cum_skus_pct",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "cum_skus_pct",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1760689869,
          "cachedResultUrl": "",
          "cachedResultName": "Pareto"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "Data Analytics"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "82773b29-a1dc-445c-a8ea-d9c393d36eb4",
      "name": "ABC Class Mapping",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        -16
      ],
      "parameters": {
        "jsCode": "// 1) Extract and sort by sales contribution\nlet rows = items.map(i => i.json);\nrows.sort((a, b) => b.share_qty_pct - a.share_qty_pct);\n\n// 2) Compute cumulative contribution\nlet cum = 0;\nfor (let r of rows) {\n  cum += r.share_qty_pct;\n\n  // 3) Assign class based on cumulative %\n  if (cum <= 5) {\n    r.ABC = 'A';   // top 5%\n  } else if (cum <= 20) {\n    r.ABC = 'B';   // next 15%\n  } else {\n    r.ABC = 'C';   // rest\n  }\n\n  r.cum_share = Number(cum.toFixed(2));\n}\n\n// 4) Return enriched rows\nreturn rows.map(r => ({ json: r }));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "21867671-78aa-4580-b51f-53c34f6a1dfa",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1166,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 540,
        "height": 544,
        "content": "### Trigger the workflow\nThis starts by collecting the transactional sales from the spreadsheet `Input Data` from the Google Sheet.\n\n#### How to setup?\n\n- **Load records in the Google Sheet Node**:\n   1. Add your Google Sheet API credentials to access the Google Sheet file\n   2. Select the file using the list, an URL or an ID\n   3. Select the sheet `Input Data`\nination**, **distance**, **duration**, **n_steps**\n  [Learn more about the Google Sheet Node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Sales Store 1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sales Store 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transpose": {
      "main": [
        [
          {
            "node": "Multi-Store Sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pareto Analysis": {
      "main": [
        [
          {
            "node": "Update Pareto Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ABC Class Mapping": {
      "main": [
        [
          {
            "node": "ABC XYZ Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Filter Out Zero Sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TO, QTY GroupBy ITEM": {
      "main": [
        [
          {
            "node": "Pareto Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Sales per Store": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Out Zero Sales": {
      "main": [
        [
          {
            "node": "Demand Variability x Sales %",
            "type": "main",
            "index": 0
          },
          {
            "node": "TO, QTY GroupBy ITEM",
            "type": "main",
            "index": 0
          },
          {
            "node": "TO GroupBy (STORE, ITEM)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Daily Sales per Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TO GroupBy (STORE, ITEM)": {
      "main": [
        [
          {
            "node": "Transpose",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Demand Variability x Sales %": {
      "main": [
        [
          {
            "node": "ABC Class Mapping",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

*Tags: Supply Chain, Inventory Management, ABC Analysis, Pareto Principle, Demand Variability, Automation, Google Sheets*

Source: https://n8n.io/workflows/8618/ — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

This template is ideal for solo store owners, eCommerce marketers, automation beginners, or anyone using Shopify and Gmail who wants to recover lost revenue without coding.

HTTP Request, Gmail, Twilio +3
Data & Sheets

PCN. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, itemLists. Event-driven trigger; 60 nodes.

Google Sheets, HTTP Request, @N Octo N/N8N Nodes Json Database +3
Data & Sheets

The workflow automates the process of gathering extensive keyword data for a "Main Keyword." It starts by reading initial parameters from a Google Sheets template, creates a new dedicated Google Sheet

Google Sheets, Google Drive, HTTP Request
Data & Sheets

🔥 March Sale – n8n Community Members Get ideoGener8r for Just $27! (Reg. $47) Use Coupon Code: (Valid until 3/31/2025 for n8n community members)

HTTP Request, Google Drive, Google Sheets
Data & Sheets

📄 Documentation: Notion Guide

Google Sheets, Google Drive, HTTP Request +2