How it works

Follow these 7 simple steps to start receiving Slack alerts when angry support tickets arrive in Gorgias

gorgias logo icon

Ticket Created

App connector: Gorgias • Time to complete: 0 minutes (Auto-configured)
Why this matters: This trigger watches for new tickets in your Gorgias inbox and kicks off the analysis workflow. Without this monitoring step, you'd need to manually review every incoming ticket to identify frustrated customers.

When a new ticket is created in Gorgias, this trigger captures the ticket details and passes them to the next step for message retrieval. The trigger checks your Gorgias inbox hourly for new tickets, though this can be adjusted if you need more frequent monitoring. No configuration is needed—it automatically connects to your Gorgias account once you authorize MESA.

Get List of Ticket's Messages

App connector: Gorgias • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step retrieves the actual message content from the ticket so the AI has something to analyze. If this step fails, the workflow can't determine whether the customer is upset because there's no text to evaluate.

The step pulls all messages associated with the ticket ID from Step 1, including the initial customer message and any follow-up replies. It automatically extracts the message text in a format the AI can process in the next step. This is completely auto-configured and uses the ticket ID from the trigger to fetch the correct messages from Gorgias.

Prompt (AI Analysis)

App connector: AI • Time to complete: 1 minute
Why this matters: This is where the actual sentiment detection happens. The AI evaluates the customer's language to determine if they're angry, frustrated, or upset, which determines whether your team needs to prioritize this ticket.

The AI receives the customer's message text and analyzes specific language patterns, word choices, and sentence structures that indicate anger or frustration. It outputs a confidence score from 1 to 5 (where 5 means highly confident the customer is angry) along with a brief explanation of what indicators it detected, like aggressive phrasing, urgent demands, or negative sentiment. The AI temperature is set to 0 for consistent, reproducible analysis without creative interpretation.

Custom Code (Convert AI Response to JSON)

App connector: Code • Time to complete: 0 minutes (Auto-configured)
Why this matters: The AI returns its analysis as formatted text, but the next steps need structured data to evaluate the confidence score. This transformation ensures the filter step can properly compare the score against your threshold.

This code takes the AI's response text and converts it into a clean JSON object with separate fields for the confidence score and explanation. It parses the response string into a JavaScript object so the filter step can access the numeric confidence score directly. Here's the conversion code:

const Mesa = require('vendor/Mesa.js');

module.exports = new class {
  script = (prevResponse, context) => {
    // Retrieve the Variables Available to this step
    const vars = context.steps;
    // Get AI response
    let aiResponse = vars.ai.response;
    // Convert to JSON array
    let responseArray = JSON.parse(aiResponse);

    // Call the next step in this workflow
    // response will be the Variables Available from this step
    Mesa.output.next({ai_response: responseArray});
  }
}

Filter (Check Anger Threshold)

App connector: Filter • Time to complete: 1 minute
Why this matters: Not every slightly negative message needs immediate escalation. This filter prevents alert fatigue by only forwarding tickets that meet your minimum anger threshold, so your team focuses on truly urgent issues.

The filter compares the AI's confidence score against your chosen threshold (default is 3 or higher). If the score meets or exceeds the threshold, the ticket continues to Slack; if not, the workflow stops here and the ticket stays in your normal support queue. You can adjust the threshold between 1 and 5 when setting up the workflow—set it higher (4-5) if you only want extremely angry messages escalated, or lower (2-3) if you want to catch more potentially upset customers.

Retrieve Shop

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step fetches your Shopify store domain so the Slack message can include a properly formatted link back to the Gorgias ticket in your specific account. Without this, your team would need to manually navigate to find the ticket.

The step pulls your Shopify shop information, specifically your store domain, which gets used to construct the Gorgias ticket URL in the next step. For example, if your Shopify store is "yourstore.myshopify.com", this step captures "yourstore" so the workflow can build the correct Gorgias link format. This is auto-configured and runs in the background.

slack logo icon

Send Message (Slack Alert)

App connector: Slack • Time to complete: 2 minutes
Why this matters: This is where your team actually gets notified about urgent tickets. The Slack message includes everything needed to respond immediately—the direct ticket link, why the AI flagged it, and the customer's full message—so no one wastes time tracking down context.

You'll configure two things: which Slack channel receives the alerts (like #support-urgent or #customer-escalations), and your Gorgias Inbox ID. The Gorgias Inbox ID is found in your Gorgias URL when viewing your inbox—it's the numbers after "/apps/views/". The message format includes a clickable link to the ticket, the AI's confidence score, the AI's explanation of why it detected anger, and the customer's original message text. Make sure to invite the MESA Slack app to your chosen channel before selecting it.

Make it your own

Customize this workflow even further:

Escalate to multiple channels based on severity
Route tickets with confidence scores of 5 to an emergency escalation channel, while scores of 3-4 go to your standard support team channel for prioritized but less urgent handling.
Tag tickets in Gorgias automatically
Add a step after the filter to apply a "High Priority" or "Angry Customer" tag in Gorgias, making it easy to identify escalated tickets even when viewing them directly in your helpdesk.
Store escalation data in tables
Save each flagged ticket's details—confidence score, explanation, customer info, and resolution time—in a MESA data table to analyze trends in customer frustration and identify recurring issues.
Create follow-up tasks in project management tools
Send high-priority tickets to Asana, ClickUp, or Trello as tasks assigned to your customer success manager, ensuring angry customers get dedicated follow-up beyond the initial support response.

Frequently asked questions

What types of language patterns does the AI detect as "angry"?
The AI looks for aggressive phrasing, demanding language, urgent time pressures, negative sentiment words, capitalization for emphasis, and frustrated sentence structures. For example, "I NEED this fixed NOW" or "This is completely unacceptable" would score higher than "I'm having some trouble with my order."
Can I get alerts for other emotions besides anger, like confusion or disappointment?
Yes, you can modify the AI prompt in Step 3 to detect different emotional tones. Change the prompt to analyze for confusion, urgency, disappointment, or even positive excitement, and adjust the filter threshold accordingly.
What happens if the AI misjudges a customer's tone?
The AI includes an explanation with each confidence score, so your team can quickly assess whether the escalation was warranted. Over time, you can adjust the threshold up or down based on whether you're getting too many or too few alerts. You can also modify the AI prompt to be more or less sensitive to certain language patterns.
What is a template?
Templates are pre-made workflows by our team of experts. Instead of building a workflow from scratch, these have all the steps needed to complete the task.
Can I personalize a template?
Yes! Every step can be customized to meet your exact requirements. Additionally, you can even add more steps and make it more sophisticated.
Are templates free?
Yes! Our entire library containing hundreds of templates are free to use and customize to your exact needs.

Ready to start receiving Slack alerts when angry support tickets arrive in Gorgias?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Start with this template — It's free
7-day free trial • 8 min setup • Cancel anytime