Use this advanced n8n workflow to perform complex Inventory ABC and Pareto analysis on sales data stored in Google Sheets. Automate supply chain optimization metrics using custom n8n code nodes.
Download this n8n workflow template and start using it instantly.
• Supply Chain Managers seeking automated inventory classification.
• Business Analysts who need to streamline complex data aggregation and statistical reporting.
• Retail Operations teams looking for actionable insights based on item turnover and demand volatility.
• Users who require sophisticated data transformation features beyond standard n8n templates and nodes.
Effective inventory management hinges on accurate classification, such as the ABC analysis (ranking items by contribution to turnover) and XYZ analysis (ranking items by demand variability). This specialized n8n workflow solves the tedious problem of manually performing these complex, multi-stage calculations.
Starting with raw transactional data extracted from a Google Sheets n8n node, the flow immediately filters out irrelevant zero-sales records. It then splits into four parallel processing pipelines, each handling a critical aspect of supply chain reporting: Daily Store Sales, Multi-Store Cross-Tabulation, Pareto Ranking, and the critical ABC/XYZ classification. By heavily utilizing the Code n8n node, this n8n workflow calculates metrics like cumulative share, standard deviation, and coefficient of variation (CV) for highly accurate stock segmentation, providing immediate value for optimization efforts. This powerful set of n8n templates ensures your inventory strategy is data-driven and automated.
The entire process begins with the Manual n8n trigger, initiating the data flow.
Daily Sales per Store Code n8n node aggregates daily Quantity (QTY) and Turnover (TO) per store. An If n8n node then directs the aggregated results to the respective 'Sales Store 1' or 'Sales Store 2' Google Sheets destination.TO GroupBy (STORE, ITEM) Code n8n node builds a store-by-item turnover matrix, which is then transposed by the Transpose Code n8n node for cross-store comparison, writing the result via a Google Sheets n8n node.TO, QTY GroupBy ITEM Code n8n node sums total turnover and quantity per item. The Pareto Analysis Code n8n node sorts items by turnover and calculates cumulative share and SKU rank. These detailed results are appended to the 'Pareto' sheet using a Google Sheets n8n node.Demand Variability x Sales % Code n8n node calculates statistical measures (mean, standard deviation, coefficient of variation, or CV) per item, essential for XYZ classification. The final ABC Class Mapping Code n8n node applies business logic to assign an ABC class (based on contribution percentage) to each item. The comprehensive output is then saved to the 'ABC XYZ' sheet using the final Google Sheets n8n node in this n8n workflow.To deploy and run this comprehensive analysis n8n workflow, follow these steps:
Get row(s) in sheet, Sales Store 1/2, Update Pareto Sheet, ABC XYZ Analysis). When clicking ‘Execute workflow’ (Manual Trigger n8n trigger): Starts the entire analytic process manually. This simple n8n trigger is ideal for scheduled or ad-hoc batch processing.
Get row(s) in sheet (Google Sheets n8n node): Function: Extracts the raw transactional sales data, including columns like STORE, DAY, ITEM, QTY, and TO, from the 'Input Data' sheet.
Filter Out Zero Sales (Filter n8n node): Function: Ensures data quality by filtering out any records where QTY (quantity) equals 0, minimizing noise in subsequent calculations.
Daily Sales per Store (Code n8n node): Function: Aggregates sales data to calculate daily totals for QTY and TO grouped by (STORE, DAY). This custom n8n node script ensures accurate daily summary reporting.
Pareto Analysis (Code n8n node): Function: Performs the core Pareto 80/20 analysis. It sorts items by Turnover (TO) descending and computes crucial metrics like absolute cumulative turnover, cumulative share (to identify A/B/C items), and SKU rank.
Demand Variability x Sales % (Code n8n node): Function: Calculates statistical measures for XYZ classification. This custom n8n node determines the mean, standard deviation, and coefficient of variation (CV) for sales quantity per item, measuring demand stability.
ABC Class Mapping (Code n8n node): Function: Assigns inventory classification (A, B, or C) based on customizable cumulative sales contribution thresholds (A: up to 5%, B: up to 20%). This script is critical for the final classification output of this n8n workflow.
Update Pareto Sheet (Google Sheets n8n node): Function: Appends the fully ranked and analyzed Pareto results, including cumulative share percentages, back to the 'Pareto' sheet for visualization.
Use this powerful n8n workflow template to automate candidate interview scheduling. Triggers from Google Sheets, calculates the next available time slot, books Google Calendar, and sends a personalized email using GPT-4o.

Use this powerful n8n workflow to turn the Internet Archive Wayback Machine API into a callable tool for your AI agents using the specialized n8n trigger. Ideal n8n templates for AI tooling.

Create an Internet Archive search tool using this n8n workflow. Integrate three dedicated search endpoints (organic, fields, scrape) for advanced AI agents via an n8n MCP server.

Use this powerful n8n workflow to compare inventory counts between Notion and Airtable, automatically reconcile discrepancies, and send AI-generated Slack alerts using GPT-4o.

Use this robust n8n workflow to automate monthly invoice creation using Google Sheets and manage collections by sending escalating email payment reminders. Easily deploy this n8n template for finance automation.

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







































