<aside> 🛒

Industry: E-commerce & Customer Support

</aside>

HouseBox_case_cover.png

n8n · OpenAI · Gmail · Google Sheets · Telegram

Context

HouseBox is a home goods online store. According to the owner's baseline, the team handles about 900 customer contacts per month, approximately 50% about delivery. Average time to first reply was reported as 11 hours, CSAT as 2.9/5, and one support manager had left. These are starting conditions supplied for the project, not outcomes measured by this prototype.

Problem

Support requests arrived in a shared inbox and were sorted manually. Urgent legal, security, payment, and repeat complaint cases could be buried among routine questions and advertising. There was no single ticket log showing an owner, first response deadline, and escalation history.

Solution

I built two connected n8n workflows:

  1. AI ticket routing: Gmail → input normalization → OpenAI classifier → business rule validation → Google Sheets ticket log → Telegram classification alert → mark the email as read.
  2. SLA watcher: a scheduled check reads open tickets every minute, calculates the escalation stage, sends a Telegram alert, and stores the new stage in the ticket log to prevent repeat alerts.

The classifier assigns one of five categories, a priority from P1 to P4, a role owner, and a first response SLA of 15, 60, 240, or 1,440 minutes. The model records a concise, observable decision rationale in 2–3 sentences. SLA alerts fire at 75% of the allowed time (L1), the deadline (L2), and 50% beyond the deadline (L3).

Role ownership and SLA targets are prototype assumptions that HouseBox should approve before live customer use. The system has no order database connection and does not infer real order status or refund decisions.

Process

Prompt design. The system prompt defines the role, business context, routing instructions, a private decision check, and strict JSON output. The stored rationale explains visible signs in the customer message without exposing hidden model reasoning.

Integrations. Connected Gmail, OpenAI API, Google Sheets, and Telegram credentials in n8n. A unique SLADEMO subject marker isolated the synthetic test messages from other email automations.

Testing and iteration. I sent 10 scenarios covering delivery delays, refunds, duplicate charges, repeat complaints, legal action, data risk, product questions, order status, return rules, and spam. One return policy question was initially routed as a product question. I corrected the log, added a rule for pre-purchase return policy questions, published the new workflow version, and sent an eleventh test to verify the fix.

Results

Measure Verified result
Synthetic emails processed and logged 11 / 11
Classification fields recorded category, priority, owner, SLA, rationale
First two-ticket workflow execution 8.705 seconds
Escalation stages exercised L1, L2, L3
Initial classification errors found and corrected 1 / 10

The 8.705 seconds is the n8n execution time for a two-ticket batch; it is not a measured customer reply time. The three escalation stages were tested by adjusting synthetic ticket deadlines, then restoring the original deadlines after alerts were logged. Actual time savings and CSAT improvement have not yet been measured. At an assumed five minutes of manual sorting per contact, 900 contacts would represent 75 hours per month of sorting effort; this is an estimate for validation, not a realized saving.