8
n8n 中文网amn8n.com

基于Google表格的库存ABC与帕累托分析

高级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 17 个节点。主要使用 If, Code, Filter, GoogleSheets, ManualTrigger 等节点。 基于Google表格的库存ABC与帕累托分析,用于供应链优化

前置要求
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "dd09796e-b4c4-43df-8401-bba895d330b3",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1056,
        -400
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5f502423-b87c-4322-aac6-10d07e685087",
      "name": "获取表格中的行",
      "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": {
          "id": "",
          "name": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "15e8b11a-83d9-41cb-84e4-dbfe0ddf970f",
      "name": "过滤零销售额",
      "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": "转置",
      "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": "每日单店销售额",
      "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": "如果",
      "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": "门店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": {
          "id": "",
          "name": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "fdffd98a-36ac-425b-861c-b3f738828fe2",
      "name": "门店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": {
          "id": "",
          "name": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "8a3afe9e-d873-4a02-9fb1-45fc9c380601",
      "name": "帕累托分析",
      "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": "按商品分组的总订单数量",
      "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": "按(门店,商品)分组的总订单",
      "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": "多门店销售",
      "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": {
          "id": "",
          "name": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "5bd88834-9c20-4d9e-bd31-146dc31e2c18",
      "name": "需求变异性 x 销售百分比",
      "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 分析",
      "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": {
          "id": "",
          "name": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "fb1b23cb-cad9-4a75-bb41-5d87209b51c5",
      "name": "更新帕累托表格",
      "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": {
          "id": "",
          "name": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.7
    },
    {
      "id": "82773b29-a1dc-445c-a8ea-d9c393d36eb4",
      "name": "ABC 分类映射",
      "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": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1166,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 540,
        "height": 544,
        "content": "### 触发工作流"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "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 ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 杂项, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量17
分类2
节点类型6
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Samir Saci

Samir Saci

@samirsaci

Automation, AI and Analytics for Supply Chain & Business Optimization Helping businesses streamline operations using n8n, AI agents, and data science to enhance efficiency and sustainability. Linkedin: www.linkedin.com/in/samir-saci

外部链接
在 n8n.io 查看

分享此工作流