automations.help

Support & returns

Auto-tag and route support tickets by topic

Most DTC inboxes are one big undifferentiated queue: a wholesale inquiry, a damaged-item photo, and a 'where's my order?' all sit in the same line, and whoever's free grabs the top one regardless of whether it's theirs to answer. This reads every inbound Gorgias ticket, decides what it's actually about from a taxonomy you define, tags it, and routes it to the right team or view — keyword rules for the obvious cases, an LLM fallback for the fuzzy ones, and a 'needs-triage' safety net for anything it isn't sure about. Build it yourself with the steps below — or we build it, tune the taxonomy against your real inbox, and hand it over so you own it outright with no monthly fee. Free teardown of your current setup first.

Difficulty
Intermediate
Time to build
3-6 hrs
Updated
  • Gorgias
  • n8n

The manual way today

Tickets arrive into one shared Gorgias inbox and get worked top to bottom. There's no signal about what each one is — a returns question, a product pre-sale question, a wholesale request, a billing dispute, a damaged package — so the first available agent opens whatever's on top. Half the time it's not theirs: the returns specialist ends up answering a B2B pricing email, someone forwards a damaged-item case to the right person, and a Spanish-language ticket waits for whoever happens to read Spanish. Triage is happening by hand, one ticket at a time, on every single message.

The cost is two-sided and quiet. First-touch goes to the wrong person, so tickets bounce — opened, read, reassigned, re-read — and every hop adds delay the customer feels. Specialists lose their focus to context-switching between unrelated topics all day. And because nothing is tagged, you have no idea what your inbox is actually made of: you can't see that returns doubled this month, or that a product defect is generating a spike, until it's already a fire. The triage tax scales with volume and shows up nowhere on the response-time dashboard.

What running looks like

A ticket lands and, within seconds, it carries a topic tag and is sitting in front of the right team. Obvious cases — a clear returns request, a tracking question, a wholesale inquiry — are tagged by keyword and metadata instantly. The fuzzy ones get a single-label classification against your fixed taxonomy. Anything the system isn't confident about gets a 'needs-triage' tag and stays in the general queue for a human, never force-routed to the wrong place. Language is detected and routed too. And because every ticket is now tagged, your inbox composition becomes a chart instead of a guess.

01The build

How to build it

  1. Define the topic taxonomy against your real inbox — on paper first

    Needs a human

    Routing is only as good as the buckets you route into, so write them before you build. Open the last few hundred tickets and group them into the handful of topics that actually recur — for most DTC stores that's: order status / WISMO, returns & exchanges, order change or cancel, damaged / wrong / missing item, product or pre-sale question, billing & payment, wholesale / B2B, and subscription (if you run Recharge). Keep it under ten. For each topic, write down the destination it routes to (a team, an assignee group, or a Gorgias View) and the tag string. Resist a 25-topic taxonomy — every extra bucket is a new way to mis-route, and topics nobody routes on are just noise.

  2. Fire on every new inbound ticket from Gorgias

    Runs itself

    In Gorgias, create a Rule (or an HTTP Integration) with the trigger 'Ticket created' that POSTs the ticket payload — ticket ID, channel (email / chat / Instagram / etc.), requester email, subject, first message body, and whether an order is already linked — to a webhook in n8n. Fire on inbound customer messages only, not on agent replies, so you're never classifying your own team's words. Creation-time is enough for routing; you don't need to re-run on every follow-up the way an escalation rule would.

  3. Run the cheap deterministic pass first

    Runs itself

    Most tickets don't need an LLM. In n8n, classify on free, reliable signals before spending a token: subject and body keyword matches ('return', 'refund', 'where is', 'tracking', 'wholesale', 'broken', 'damaged', 'cancel', 'invoice'), the channel it came in on, and whether Gorgias has already linked a Shopify order. Keep the keyword-to-topic map in one place so it's editable without touching the flow. A clear hit here assigns the topic outright and skips the model entirely — this is what keeps the build fast and cheap at volume.

  4. Fall back to a constrained LLM classification for the rest

    Runs itself

    For tickets the keyword pass can't confidently place ('it's been forever', 'this isn't what I expected', 'do you ship to Canada?'), send the message body plus your fixed taxonomy to an LLM node and ask for a single label and a confidence score. Constrain the output to your exact topic enum so the model can't invent a category — it must return one of your buckets or the literal 'other'. Pass only the message text and the list of allowed topics; you don't need customer PII in the prompt to classify a topic.

  5. Gate on confidence — 'needs-triage' is the safety net

    Runs itself

    This step is what keeps the whole thing trustworthy. If the LLM's confidence is below your threshold, or it returns 'other', or two topics tie, do not route — tag the ticket 'needs-triage' and leave it in the general queue for a human. A confidently mis-routed ticket is worse than an untriaged one, because the customer waits on the wrong person before anyone notices. Set the threshold deliberately and tune it from the weekly review; start cautious and loosen as you trust it.

  6. Detect language and fold it into the route

    Runs itself

    If you sell internationally, a perfectly-tagged returns ticket in Spanish still routes wrong if it lands with an English-only agent. Run a lightweight language-detection step on the message body and treat language as a second routing dimension alongside topic. A Spanish returns ticket routes to the Spanish-speaking team's returns view; if you have no native speaker for a language, route it to a dedicated 'translation-needed' queue rather than dropping it on someone who can't read it.

  7. Write the tag back to Gorgias — idempotently

    Runs itself

    Apply the topic tag (and the language tag) via the Gorgias API. Before writing, read the ticket's existing tags and skip if your topic tag is already present, so a reprocessed or re-opened ticket never gets double-tagged or bounced between routes. Use one canonical topic tag per ticket for routing — add secondary descriptive tags if you like, but route on exactly one — and namespace them (e.g. 'topic:returns', 'lang:es') so they're easy to filter and report on later without colliding with tags your team adds by hand.

  8. Route to the team or view, then review the misses weekly

    Needs a human

    Map each topic tag to its destination from step 1: set the ticket's assignee team, or move it into the matching Gorgias View, so the right specialist sees it first instead of fishing it out of the general pile. Route by team or view rather than a single named agent by default, so a route never dead-ends on someone who's out. Then close the loop: log every ticket's predicted topic and watch which ones a human reassigns — those reassignments are your ground truth. Spend ten minutes a week moving the misses into the keyword pass or tightening the taxonomy. A router nobody tunes drifts into noise; the weekly pass is what keeps agents trusting the routes instead of re-checking them.

02The stack

What it’s built on

Gorgias
The helpdesk where tickets land and get worked. Its Rules engine fires the webhook on ticket creation, its tags carry the topic and language labels, and its Views and team assignment are the destinations you route into. It also already links each ticket's Shopify order, which the deterministic pass uses as a free signal.Gorgias can do simple keyword-based tagging and assignment in its own Rules on any plan, and offers AI intent detection on higher / add-on tiers. This recipe is worth it when you want a custom taxonomy with an LLM fallback and a confidence gate that you own — tags and logic that live in your n8n flow and would survive a move to another helpdesk, not locked inside one vendor's AI add-on.
n8n
The classifier and router. It receives the Gorgias webhook, runs the keyword pass, calls the LLM only for the leftovers, applies the confidence gate and language detection, then writes the tags back and sets the route via the Gorgias API.n8n is open-source and self-hostable for free, so the classification logic — and the LLM key it calls — stay under your control; their cloud tier just saves you running the server yourself. Zapier works for the keyword-only version but gets awkward once the LLM branch and confidence gate come in.

03Questions

Before you build

Doesn't Gorgias already auto-tag and assign tickets with its Rules?

For the obvious cases, yes — and you should use it: a Rule that tags anything containing 'wholesale' and assigns it to the B2B team is exactly the deterministic pass this recipe starts with. Where it stops is the fuzzy half of the inbox that doesn't match a keyword, and a confidence gate that knows when not to route. This recipe keeps the simple Rules and adds an LLM fallback plus a 'needs-triage' safety net around them — and because the taxonomy and logic live in your own n8n flow, they're not stranded if you ever switch helpdesks.

What happens to a ticket it can't confidently classify?

It gets tagged 'needs-triage' and stays in the general queue for a person to place — it is never force-routed. That's deliberate: a confidently wrong route sends the customer to the wrong specialist and adds a hop before anyone catches it, which is worse than leaving an ambiguous ticket in the shared pile. The confidence threshold is yours to set, and the weekly review is where you tighten it.

Will it route a ticket to someone who's offline or out?

Not if you route to a team or a Gorgias View rather than a single named agent, which is the default here. The topic decides which queue the ticket lands in; who picks it up is still up to the team's normal assignment. If you do want individual assignment, add an availability or capacity check before the route so it never dead-ends on one person's inbox.

Can a ticket have more than one topic?

It can carry several tags, but it routes on exactly one. Real tickets often touch two things ('I want to return this and also where's my replacement?'); pick the primary topic for routing and add the rest as secondary tags for reporting. Routing on one canonical tag keeps a ticket from being pulled into two queues at once — the human who owns the primary topic handles the rest.

Does this handle non-English tickets?

Yes — language is treated as a second routing dimension. A detection step reads the message body and a Spanish returns ticket routes to the Spanish-speaking team's returns view, not just 'returns'. If there's no agent for a given language, it routes to a translation-needed queue instead of landing on someone who can't read it.

Do I need n8n, or can I do this in Gorgias alone?

The keyword-and-metadata version runs fine in Gorgias Rules by itself — start there. You add n8n when you want the parts Rules can't do well: the constrained LLM classification for fuzzy tickets, the confidence gate, language detection as its own dimension, and idempotent tag-writes. Building the deterministic pass first and layering n8n on top is the sensible order.

Support & returns

Auto-draft Gorgias replies to 'where is my order' tickets

'Where is my order?' is the most common ticket in DTC support, and almost every answer is the same lookup: find the order, find the tracking, paste it back. This watches Gorgias for WISMO tickets, pulls the live fulfillment status from Shopify (and ShipBob when Shopify's tracking is stale), and writes a ready-to-send draft into the ticket — your agent reviews, tweaks if needed, and hits send. It never auto-sends, and the messy cases (no order, delivered-but-missing) get flagged to a human instead of a canned reply. Build it yourself with the steps below — or we build it, wire in the guardrails, and hand it over so you own it outright with no monthly fee. Free teardown of your current setup first.

  • Gorgias
  • Shopify
  • ShipBob

Intermediate4-7 hrs

Support & returns

Auto-escalate angry support tickets to Slack

A customer threatening a chargeback at 9am shouldn't be discovered at 2pm. This watches every inbound Gorgias ticket, decides which ones are actually angry — not just mildly annoyed — and drops a Slack alert with the message, the customer's history, and a one-click link into the ticket, so the right person sees it in seconds instead of when the queue gets around to it. Build it yourself with the steps below — or we build it, tune the noise out, and hand it over so you own it outright with no monthly fee. Free teardown of your current setup first.

  • Gorgias
  • Slack

Intermediate2-4 hrs

Support & returns

Build a self-service return portal for Shopify

Right now every return is an email thread: the customer asks, you ask for the order number, you check the policy, you make a label, you wait, you refund. A self-service portal lets the customer do the routine part themselves — enter the order, pick items, get a label — while your policy runs server-side so nobody can return something they shouldn't. Gorgias only hears about the returns that actually need a human. Build it yourself with the steps below — or we build it, wire in the guardrails, and hand it over so you own it outright with no monthly fee. Free teardown of your current returns flow first.

  • Shopify
  • Gorgias

Advanced1-2 weeks

Support & returns

Auto-close stale support tickets

Half your open queue isn't open — it's answered, sitting in 'waiting on customer', never closed. Those zombie tickets pad your open count and quietly wreck your resolution-time numbers. This runs a daily sweep over Gorgias, finds tickets that have gone quiet on the customer's side, sends one polite 'reply if you still need us' nudge, then closes the ones that stay silent — tagged so they're auditable, and set to reopen the instant anyone writes back. Build it yourself with the steps below — or we build it, tune the timing against your real inbox, and hand it over so you own it outright with no monthly fee. Free teardown of your current setup first.

  • Gorgias
  • n8n

Intermediate3-5 hrs