Human-in-the-loop approval gate with AI classification and crash alerting

The Problem

An e-commerce store was issuing refunds they shouldn't have — staff approved changed-mind returns without reading the details. $340 in incorrect refunds in a single month. Meanwhile, genuinely damaged or wrong-item cases were sitting in the same queue, delayed by the same manual review process that was simultaneously failing on quality.

The Solution

An n8n Form Trigger captures return submissions. OpenAI classifies the return reason against both the dropdown selection and the customer's written description — catching cases where the two contradict. Clear cases (damaged/wrong item) auto-process immediately via Shopify refund API. Changed-mind returns pause execution using a Wait node in Webhook Resume mode, emailing the manager two unique resume URLs (Approve/Reject). Clicking either resumes the paused execution and routes accordingly. A separate Error Trigger workflow monitors all crashes and fires a Slack alert with the exact error message and failed workflow name.

Key Engineering

Result

→ Incorrect refund approvals eliminated — changed-mind returns now require explicit manager action. Damaged/wrong-item cases processed in under 60 seconds. Any workflow crash surfaces in Slack within minutes instead of days.

Tech Stack

n8n Form Trigger, OpenAI, Switch Node, Wait Node (Webhook Resume), Shopify API, Gmail, Error Trigger Workflow, Slack

n8n P6 img1.png

n8n P6 img 2.png

n8n P6 img3.png

n8n P6 img4.png