πŸ“Š Analyze procurement savings opportunities with Google Sheets, GPT-4o Mini, and Gmail

⚑ 8 views Β· πŸ“Š Market Research & Insights

Description

Quick overview

This workflow runs every Monday, analyzes procurement transactions from Google Sheets to detect savings opportunities, uses OpenAI (GPT-4o Mini) to generate recommendations and savings estimates, prioritizes the results, saves them back to Google Sheets, and emails a weekly top-5 savings report via Gmail.

How it works

  1. Runs on a schedule every Monday at 8:00 AM.
  2. Reads procurement transaction rows from Google Sheets.
  3. Aggregates the data to calculate spend by category and supplier, supplier counts per category, item-level price statistics, and preferred vs non-preferred spend.
  4. Detects savings opportunities using rules for supplier fragmentation, price variance, maverick spend, and contract leakage.
  5. Sends the detected opportunities to OpenAI (GPT-4o Mini) to produce structured analyses with savings estimates, effort levels, and recommended actions.
  6. Scores and ranks opportunities by impact versus effort, classifies them (Strategic Initiative/Quick Win/Low Priority), and appends the results to a second Google Sheets tab.
  7. Builds an HTML email with the top 5 opportunities by priority score and sends the weekly savings report via Gmail.

Setup

  1. Create a Google Sheets spreadsheet with a transactions tab that includes columns for Category, Supplier, Item Description, Quantity, Unit Price, Total Spend, Contract Price, and Preferred Supplier.
  2. Add Google Sheets OAuth credentials in n8n and update the spreadsheet ID and sheet tabs used for reading transactions and appending opportunities.
  3. Add an OpenAI credential (Chat Completions) and ensure the workflow can use the GPT-4o Mini model.
  4. Create an output tab in Google Sheets with columns matching the fields the workflow appends (Analysis Date, Opportunity Type, Category, Description, Savings Amount, Effort Score, Priority Score, Classification, Status).
  5. Add Gmail OAuth credentials and set the recipient(s) in the Gmail β€œSend Weekly Savings Report” step.
  6. Update the failure alert email (and the execution URL placeholder) so error notifications go to the right stakeholders in your n8n environment.

Additional info

How To Customize Nodes

Read Procurement Data

Customize:

Opportunity Detection

Adjust thresholds such as:

AI Opportunity Analysis

Customize:

Priority Scoring

Modify:

Email Report

Customize:

Add-Ons

Possible enhancements include:

Use Case Examples

1. Supplier Consolidation

Identify categories with excessive supplier fragmentation and estimate consolidation savings.

2. Contract Compliance Monitoring

Detect purchases made above negotiated contract rates.

3. Maverick Spend Reduction

Monitor spending outside approved supplier programs.

4. Procurement Cost Optimization

Identify categories with the highest savings potential.

5. Executive Spend Reporting

Provide leadership with prioritized savings opportunities each week.

Additional use cases can be created by extending the business rules and AI analysis layer.

Troubleshooting Guide

IssuePossible CauseSolution
No data returned from Google SheetsIncorrect Sheet ID or permissionsVerify document access and credentials
AI node failsInvalid OpenAI credentialsReconnect OpenAI account
No opportunities detectedDataset does not meet thresholdsReview detection rules and sample data
Email not sentGmail authentication issueReauthorize Gmail connection
Opportunities not savedDestination sheet mismatchVerify sheet mapping configuration
Incorrect savings estimatesAI output variationRefine AI prompt instructions
Workflow stops unexpectedlyNode execution errorReview execution logs and error output

Need Help?

If you need assistance customizing this workflow or building additional procurement automation solutions, WeblineIndia can help with:

Whether you need additional integrations, custom business rules or enterprise-grade procurement automation, professional support by hiring n8n workflow developers can help accelerate implementation and maximize business value.

πŸ”— Nodes Used

Google Sheets, Gmail, Schedule Trigger, AI Agent, OpenAI Chat Model, Structured Output Parser

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup