Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab VeloxTrend Ultrarix Capital Partners Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Get your free Agents Cheatsheet here. Our proven framework for choosing the right AI architecture.
3 years of hands-on work with real clients into 6 pages.

Publication

How I Automated Sales KPI Reporting with n8n and Cut 99% of Manual Work
Data Analysis   Data Science   Latest   Machine Learning

How I Automated Sales KPI Reporting with n8n and Cut 99% of Manual Work

Last Updated on December 29, 2025 by Editorial Team

Author(s): Apoorvavenkata

Originally published on Towards AI.

Every sales organization depends on understanding which distributors perform best and which items drive the most volume. Yet in many analytics teams, this information remains trapped in spreadsheets, requiring manual cleanup, complex formulas, pivot tables, and hours of repetitive effort every month.

In this project, I automated that entire workflow using n8n, an open-source workflow automation platform. What started as a simple Excel export containing distributor names, item details, and monthly sales was transformed into a fully automated KPI engine that calculates aggregates, ranks top performers, and generates clean, structured outputs for downstream reporting or AI-driven analysis.

Beyond eliminating manual work, this approach demonstrates how low-code automation can bridge the gap between raw operational data and scalable analytics — without relying on brittle Excel logic or heavy custom scripting.

Situation we are dealing with:

Our sales team received a recurring Excel export from the ERP system. The data structure was simple:

  • Distributor
  • Item name
  • Monthly Sales in the dollowing columns

every month, Analyst has to process the data to give the repetitive metrics.

My goal was to design an automation that:

  1. Ingests the ERP Excel file automatically
  2. Processes each row into structured JSON
  3. Aggregates sales across distributors and items
  4. Generates formatted summaries
  5. Outputs clean KPI data for dashboards or AI agents
How I Automated Sales KPI Reporting with n8n and Cut 99% of Manual Work
n8n workflow setup

I built a multi-step n8n workflow that mirrored the work of a human analyst, but at machine speed.

1. Manual or Scheduled Trigger

This starts the workflow with each new ERP export.

2. Read Excel

The file is converted into structured JSON rows.

3. Process Excel Data

A JavaScript block extracts:

  • Distributor
  • Item name
  • Aug, Sep, Oct values

This logic dynamically detects column types rather than depending on header names, which makes it resilient to column order changes.

Beyond AI Tools: How I Architect Systems That Actually Run the Business

Example structured Row

{
"distributor": "Cascade Beverage Supply",
"itemname": "Tropical Breeze 12/19.2 oz Can",
"aug": 1286.27,
"sep": 1481.60,
"oct": 1451.47
}

Final output looks like below

Sales by Distributor
Distributor | Aug | Sep | Oct
----------------------------------------------
Cascade Beverage Supply | 7547.87 | 7815.34 | 8734.12
GreenPeak Distribution | 3642.43 | 3654.56 | 4286.23
Harborline Craft Distributors | 931.99 | 965.83 | 911.07
RueNorth Liquid Logistics | 46.09 | 9.24 | 85.13
Sales by Item
Item Name | Total Sales
-----------------------------------
Tropical Breeze 12 oz | 4219.33
Citrus Spark 16 oz | 4689.54
Berry Burst 12 oz | 2876.67
Mango Wave 8 oz | 4902.50
Ginger Zest 16 oz | 2574.00
Pineapple Rush 12 oz | 2095.07
Guava Mist 12 oz | 743.50
Summer Blosson 16 oz | 1996.72

The workflow outputs:

  • A human readable summary
  • Distributor-level breakdowns
  • Item-level totals
  • Total number of monthly records

This structured output becomes the foundation for our Sales AI Agent in Part Two.

The outcome was immediate and measurable

  • Monthly sales data processing time dropped from 2 hours to 10 seconds
  • Leadership receives structured KPI insights instantly
  • Distributor and item performance comparisons became fully automated
  • Accuracy increased because the system no longer relies on manual formulas
  • The sales team now uses the standardized output across forecasting, inventory decisions, and distributor performance reviews

Most importantly, the business gained a new metric.

Time to Insight Reduced by 99 Percent

By automating the sales KPI workflow with n8n, a process that previously took hours of manual effort was reduced to seconds. Monthly reporting no longer depends on spreadsheet cleanup or repeated formulas, allowing insights to be generated consistently and on demand.

Beyond the time savings, the automation improved reliability. KPI logic is now centralized, repeatable, and independent of individual spreadsheets, making the outputs easier to reuse across dashboards, reports, and downstream analytics.

While this example focuses on sales KPIs, the same approach can be applied anywhere repetitive data preparation slows decision-making. Workflow automation offers a practical way to move from manual reporting to scalable analytics without overengineering.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI


Get your free Agents Cheatsheet here. Our proven framework for choosing the right AI architecture.
3 years of hands-on work with real clients into 6 pages.

Take our 90+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Discover Your Dream AI Career at Towards AI Jobs

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 40,000 live jobs today with Towards AI Jobs!

Note: Content contains the views of the contributing authors and not Towards AI.