Remember those days? The support inbox would swell up, and every morning started with a game of 'who gets this one?' It was a constant mental load, manually sifting through incoming customer support tickets, trying to figure out if it was a frontend bug, a database issue, a simple billing question, or yet another ambitious feature request. Not only was it a huge time sink for me, but tickets often sat in a general queue longer than they should have, or worse, got assigned to the wrong team, leading to unnecessary re-assignments and frustration.
The Problem: Manual Triage Was Killing Me (and Our Response Times)
As our user base grew, so did the volume of support requests. We're a small team, and every minute counts. Having me or another developer spend an hour each day just triaging tickets was unsustainable. It felt like we were always playing catch-up, and our engineers were getting bombarded with tickets outside their domain, which meant context switching and delays.
My primary goal was to get tickets to the right engineer or team as quickly as possible, with minimal human intervention. We use Intercom for customer support, but its native automation, while decent for simple keyword matching, just wasn't cutting it for the nuanced language of customer problems.
What I Tried: Rules, Regex, and Almost a Custom NLP Model
Initially, I tried to lean heavily on Intercom's existing rules engine. I spent what felt like weeks writing complex IF this AND NOT that OR this OTHER thing rules. I tried keyword matching, regular expressions for common error codes, and even some basic sentiment analysis. It was an absolute nightmare.
- Keyword matching: Too brittle. A user describing a "login issue" could mean anything from a forgotten password (billing/account team) to an API authentication failure (backend team). Keywords alone lacked context.
- Complex Rules: Maintenance was a full-time job. Every time a new feature shipped, or a common issue surfaced, I had to update a sprawling web of rules. It became an unmanageable mess. I even considered writing a small Python script that would hit the Intercom API, process the text with some open-source NLP library, and then update the ticket. But honestly, the thought of maintaining another microservice, setting up hosting, and dealing with model training and drift just for ticket routing made me want to curl up and cry. I'm an indie dev; I need to ship, not build infrastructure for internal tooling that doesn't directly serve customers.
What Actually Fixed It: GPT-4 + Zapier to the Rescue
Then, one evening, while messing around with the OpenAI API for another project, it clicked. GPT-4, with its incredible language understanding, could absolutely solve this. And better yet, I could probably stitch it together with Zapier, avoiding any custom code deployments.
Here’s how I built the automation, step-by-step:
The Trigger: A new conversation starts in Intercom. This was straightforward with Zapier's built-in Intercom integration. When a new inbound message lands, Zapier wakes up.
-
The GPT-4 Action: This is where the magic happens. I used Zapier's OpenAI action (specifically, Send Conversation). The key here is crafting a solid prompt. I spent a good half-day iterating on this, burning through about $7 worth of API credits until it consistently spat out what I needed. Early versions sometimes hallucinated categories or struggled with ambiguity, so I had to be very explicit.
Here's a simplified version of my current prompt, tweaked for clarity:
You are a highly experienced customer support triage agent for a SaaS company. Your goal is to accurately categorize and assign incoming support tickets. Read the customer's initial message and determine:
- Category: One of the following: "Billing & Account", "Bug Report", "Feature Request", "Technical Issue", "General Inquiry", "Onboarding".
- Assigned Team: One of the following: "Frontend Team", "Backend Team", "Infrastructure Team", "Mobile Team", "Product Team", "Success Team".
- Priority: "High", "Medium", "Low". Default to "Medium" unless critical (e.g., service outage, data loss).
Output your response STRICTLY as a JSON object with 'category', 'assigned_team', and 'priority' keys. DO NOT include any other text.
Customer Message:
I then passed the {{intercom_conversation_first_message}} into the prompt. The model was gpt-4-turbo-preview initially, now just gpt-4-turbo. The output from GPT-4 is a neat JSON object like {"category": "Bug Report", "assigned_team": "Backend Team", "priority": "High"}.
The Parser (Sometimes): Occasionally, GPT-4 might include an apology or stray word outside the JSON. I added a Code by Zapier step that simply takes the raw text output, trims whitespace, and then runs JSON.parse() on it. This ensures clean data for the next step. If it fails, I get an error notification, which helps me tweak the prompt.
Update Intercom Conversation: Finally, I use another Intercom action to Update Conversation. I map the category from the GPT-4 output to a custom attribute in Intercom called Ticket Category. More importantly, I map the assigned_team to the Intercom Assign to team field. I also set the Priority.
Now, when a new ticket comes in, within seconds, it's not only categorized but also assigned to the correct team, showing up in their dedicated inbox in Intercom. This has been a game-changer. Our average first response time has plummeted, and more importantly, our engineers are spending less time re-routing tickets and more time solving actual problems. It's not 100% perfect – about 95% of tickets are routed perfectly – but that remaining 5% is easily handled with a quick manual adjustment, which is a massive improvement over the previous chaos. This simple automation has probably saved us 10-15 hours a week across the team. Highly recommend giving it a shot if you're drowning in support tickets!
Top comments (0)