• Mail us
  • Book a Meeting
  • Call us
  • Chat with us

AI/ML

Automate Supplier Performance Reporting with n8n


Overview

n8n aggregates supplier data from SAP, calculates metrics and emails a report to management.

Prerequisites

  • n8n installed.
  • SAP system with API access.
  • Gmail account with API credentials.
  •  

Workflow Setup

Prepare n8n Environment

  • Navigate to http://localhost:5678 and log in.
  • Click “Workflows,” then “+ New,” and name it (e.g., “Supplier Report”). Click “+” to start.

Trigger Node: Schedule

  • Node: Schedule
  • Settings: Interval: Weekly (e.g., every Friday at 5 PM)
  • Output: Trigger signal.

Data Node: SAP

Node: SAP

Settings:

  • Credentials: SAP API key
  • Resource: Supplier Deliveries
  • Operation: Get
  • Filter: Last 7 days

Output: Delivery data (e.g., {{ $json.deliveries }}).

Calculate Node: Function

  • Node: Function
  • Settings:
  • Code: Calculate on-time rate (e.g., let rate = items[0].json.deliveries.filter(d => d.on_time).length / items[0].json.deliveries.length)
  • Output: Metrics (e.g., {{ $json.rate }}).

Report Node: Gmail

Node: Gmail

Settings:

  • Credentials: Gmail API key
  • To: management@example.com
  • Subject: Weekly Supplier Report
  • Body: On-time rate: {{ $node["Function"].json.rate * 100 }}%

Output: Report sent.

Workflow Summary

  • Flow: Schedule (trigger) → SAP (fetch) → Function (calculate) → Gmail (report).
  • Execution: ~25 seconds.
  •  

Benefits

  • Saves ~2 hours on report prep weekly.
  • Enables data-driven supplier decisions.
  • Enhances accountability.
  •  

Troubleshooting

  • SAP Fail: Check API scope.
  • Email Issues: Verify Gmail credentials.

Ready to transform your business with our technology solutions? Contact Us  today to Leverage Our AI/ML Expertise. 

Share

facebook
LinkedIn
Twitter
Mail
AI/ML

Related Center Of Excellence