Title: AI Sales Consultant for a Clothing Store (Telegram + Instagram Direct)
Context: A retail clothing store for men and women. Sales run through Instagram Direct and Telegram, the product catalog lives in a Google Sheet, and delivery is handled by Nova Poshta with full prepayment.
Problem: Every incoming DM is handled manually: find the item in the sheet, check availability and size, quote the price, collect shipping details, then re-type the order into the log. Roughly 10 minutes per inquiry. Outside business hours and on weekends nobody answers at all — that's 192 hours of silence per month, covering exactly the time people scroll their feed most. On top of that comes human error: an outdated price, or an item that's already sold out.
Solution: Six interconnected n8n workflows. Two are channel entry points (Telegram and Instagram Direct), three run as tools for the AI agent (catalog, orders, escalation), and one keeps the vector database in sync in the background. The agent consults customers, suggests sizes, offers alternatives, assembles the order, and hands it to the manager fully prepared.
Overall logic:
Key feature: business logic is decoupled from the channel. A channel workflow is responsible only for transport — accept a message, return a reply. Everything that matters — catalog, orders, escalation — lives in three standalone sub-workflows that both channels call as tools. Adding WhatsApp, Viber, or a website widget means one new entry-point workflow wired to the same three tools, with no logic rewritten.
The second property matters more here than speed: the agent physically cannot invent a price or a stock status. The catalog isn't in the prompt — the agent only sees rows returned by the database, and only those matching the "in stock" filter.
Instagram Direct ─┐
├─→ AI Agent ─┬─→ Clothing → pgvector (Supabase)
Telegram ─────────┘ (OpenRouter)├─→ Delivery → Telegram + Data Table
└─→ Handoff → manager in Telegram
Google Sheets ──(hourly)──→ Sync ──→ pgvector
The system prompt defines the role (a sales consultant with 10 years of experience), the tasks, the format, the tone, and — most importantly — the constraints. The key rules: