Chat-driven supplier management — one message triggers inventory check, supplier lookup, email, and log

The Problem

A wholesale distributor managing 6 suppliers was switching between inventory spreadsheets, a supplier contact database, and email to execute a single reorder — three systems, multiple tabs, entirely manual coordination. No single interface existed to handle the full chain from stock check to supplier notification.

The Solution

An n8n AI Agent with 4 tools, each implemented as an independent sub-workflow: Tool 1 queries live inventory from Supabase, Tool 2 retrieves supplier contact details from Postgres, Tool 3 sends the reorder email via Gmail, Tool 4 logs the action to Google Sheets. The agent receives a plain-language chat message, decides autonomously which tools to call and in what order, passes structured data between tool calls, and reports back. Tool descriptions were precision-engineered — the agent's decision quality is entirely dependent on how well each tool's purpose is defined.

Key Engineering

Result

→ Full supplier reorder chain — stock check, contact lookup, email, log — executed from a single chat message. Three-system manual process replaced by one natural language instruction. Agent correctly sequenced tool calls without explicit step-by-step instructions.

Tech Stack

n8n AI Agent, 4 Custom Tools, Workflow-as-Tool Pattern, Supabase, Postgres, Gmail, Google Sheets

n8n P11 img 1.png

n8n P11 img 2.png

n8n P11 img 3.png

n8n P11 img 4.png

n8n P11 img 5.png

n8n P11 img 6.png

n8n P11 img 7.png