Quick overview
This workflow uses an n8n Form to upload previous and current supplier price CSV files, compares them by SKU, calculates price-change classes and optional margin impact, generates HTML/CSV/XLSX reports, and writes the output files to a folder on the n8n server.
How it works
- Receives form submissions with two uploaded CSV/TXT files plus configuration such as SKU/price column names, delimiter/decimal settings, and alert thresholds.
- Extracts UTF-8 text from the uploaded “previous” and “current” files.
- Compares the two price lists in JavaScript by matching SKUs (exact or normalized), classifies rows (increased, decreased, unchanged, new, removed, needs review, incompatible), and flags increases that exceed the configured thresholds.
- Produces an HTML report, CSV exports (all rows, alerts-only, and counts), a dry-run JSON preview, and an Excel (.xlsx) export of the row-level results.
- Writes the generated files to the specified output directory on the n8n server and then returns a completion message indicating which files were written and any write errors.
Setup
- Create an output folder inside the n8n allowed file area (for example
~/.n8n-files/supplier-price-output) and ensure your n8n instance can write to it.
- Update the form fields as needed (SKU column, supplier cost column, optional name and sell-price columns, delimiter/decimal style, thresholds, and report language).
- If you activate the workflow to expose the production form URL, copy the form URL and add authentication in the Form Trigger options if you need to restrict access.