Skip to content
Tutorials Center
My learning

Topics

Lesson 34 of 36 ยท Projects and Practice

Project: Support Ticket Triage with Paths and SLAs

Build a support triage automation: classify incoming emails by keywords, set priority and SLA deadlines, branch with Paths, escalate overdue tickets and track everything in a table.

Support inboxes are a perfect automation target: lots of repetitive sorting, clear rules, and real consequences when something is missed. In this project you build a ticket triage system. Incoming messages are classified, given a priority and a service level agreement (SLA) deadline, routed to the right team, and watched by a second automation that escalates tickets nearing their deadline.

As in the other projects, the real Zapier product cannot run on this site. You get a build guide to follow in your own account (adapt names to your screens) and a JavaScript simulator of the logic, which is our own stand-in code and not part of Zapier.

Design

Inputs: new emails to [email protected] (trigger: New Email in Gmail or Outlook, or a form). Outputs: a record in a Tickets table, a message to the right team channel, an auto-reply to the customer, and escalation alerts.

Rules

Rule Condition Result
Urgent Text mentions "down", "outage", "cannot log in", "charged twice" Priority high, team Support L2, SLA 1 hour
Billing Mentions "invoice", "refund", "payment" Team Billing, priority normal, SLA 8 hours
Sales Mentions "pricing", "quote", "upgrade" Team Sales, SLA 24 hours
Everything else none of the above Team Support L1, SLA 24 hours

When several rules match, the most urgent wins. Rules are evaluated in order, so put the most important first. This is exactly how Paths work: each path has its own condition, and you decide the order carefully (Filters, Paths and Formatting).

flowchart TD
    A["New email"] --> B["Formatter: clean subject and body"]
    B --> C["Find or Create ticket (message id)"]
    C --> D{"Paths"}
    D -- "Urgent" --> E["High, L2, SLA 1h"]
    D -- "Billing" --> F["Normal, Billing, SLA 8h"]
    D -- "Sales" --> G["Normal, Sales, SLA 24h"]
    D -- "Else" --> H["Normal, L1, SLA 24h"]
    E --> I["Update ticket + notify team"]
    F --> I
    G --> I
    H --> I
    I --> J["Auto-reply with ticket number"]

One trigger, four paths, one shared finish.

Build guide

  1. Tickets table: ticket_id, message_id (unique key), from, subject, team, priority, status (open, escalated, closed), received_at, due_at.
  2. Zap 1 (intake): trigger New Email; a Formatter step lower-cases the text into one field text = subject + body; Find or Create Record by message_id so a re-read email never creates a second ticket (Tables as Lookup, State and Dedupe).
  3. Paths: four paths in the order above. In each path an Update Record action sets team, priority and due_at (a Formatter Date/Time step adds the SLA hours to received_at). Putting the shared final steps after the Paths, or duplicating them in each path, depends on your plan's editor; if steps cannot be shared, keep each path's tail identical and short.
  4. Notify: post to the team channel with ticket number, subject and due time. Send the customer an auto-reply with the ticket number. Keep the reply honest and plain: "We received your message and will answer within X hours."
  5. Zap 2 (watchdog): a Schedule trigger every 15 minutes; Find Records in the view "status is open and due soon"; message the team lead; set status to escalated so the Zap does not nag forever (guard against repeats).

Simulate the classifier and SLA

This simulator classifies sample emails and computes deadlines. Time is fixed so the output is deterministic.

JS Stand-in: classify and set SLA

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check m5: it mentions both payment and "down". The Urgent rule comes first in the list, so it wins. If you reversed the order, a real outage would sit in the billing queue for eight hours, which is why Path order is a design decision, not a detail.

A caution about keyword matching: "down" also appears in "download", "countdown" and "shut down my account request". Real rules should match whole words or phrases and be reviewed against real mail. For better accuracy you may add an AI classification step, but keep a rule-based fallback and review its output, as AI labels can be wrong.

The watchdog and escalation

The second Zap needs to answer: which open tickets will break their SLA soon? Define "soon" as less than 25 percent of the SLA time remaining.

JS Stand-in: find tickets to escalate

Press Run (or Ctrl + Enter) to see the console output here.

No output.

T-3 is skipped because it is already escalated, the same flag guard you use against infinite loops and repeated alerts.

Testing and measuring

  • Replay old emails (a sample of real ones, with personal data removed) through a test table, and count how many land in the wrong path. Adjust the keywords.
  • Track first_response_at and closed_at fields and compute average response time per team once the data builds up.
  • Check usage: intake costs roughly one Update Record, one notification and one auto-reply per ticket, plus the watchdog; compare with your forecast (Task Usage and Cost Control).
  • Mind privacy: ticket text can hold personal data. Do not paste it in public channels and shorten retention (Security and Access Control).

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. Why must the Urgent path be evaluated before the Billing path?

    Path order determines the winner when several conditions are true.
  2. 2. Why does the watchdog set status to escalated?

    A status guard prevents repeated alerts.
  3. 3. What is a weakness of the plain substring keyword 'down'?

    Match whole words or phrases, and test on real examples.

Summary

  • Triage = clean text, dedupe by message id, classify with ordered Paths, set team, priority and due time, notify and auto-reply.
  • Order matters: most urgent rules first; keyword rules need review against real mail.
  • A watchdog Zap on a schedule escalates tickets near their deadline and guards with a status flag.
  • Test on copies, measure results and watch privacy and usage.

Next: Project: Weekly Report Digest