Save Closed Gorgias Support Tickets to a Database

6 min setup
No coding required
Runs automatically

This workflow stores closed Gorgias support ticket data in MESA's private database, organizing entries by date. When used with the companion workflow, Receive a Weekly Summary of Closed Gorgias Support Tickets, it creates a searchable record of ticket resolutions, metrics, and customer interactions. This database powers reporting features that reveal support trends and response patterns. Both workflows must be active for complete functionality.

gorgias logo icon
Ticket Updated
Filter
Get List of Ticket's Messages
Loop
database icon
Create Record

You're in good company

"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
PetFriendly

"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Zailys

"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Rothy's

How it works

5 steps to save closed support tickets to your own database for analysis and reporting

gorgias logo icon

Ticket Updated

App connector: Gorgias • Time to complete: 0 minutes (Auto-configured)
Why this matters: This trigger monitors your Gorgias account for any ticket status changes, ensuring the workflow captures tickets as soon as they're marked as closed.

The trigger automatically checks your Gorgias account every hour for updated tickets. It pulls in all ticket data including status, ID, and closure timestamp without requiring any configuration from you. When a ticket status changes to "closed," this trigger passes the ticket information to the next step for processing. The hourly polling ensures you won't miss any closed tickets while keeping API usage reasonable.

Filter

App connector: Filter • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step ensures only closed tickets proceed through the workflow, preventing unnecessary processing of tickets that are still open or in progress.

The filter examines each ticket's status and only allows tickets with "closed" status to continue. It automatically compares the ticket status from step 1 against the "closed" value, blocking any tickets that are still open, pending, or solved. This filtering prevents your database from getting cluttered with incomplete ticket data. No configuration is needed as the filter condition is pre-set to look for closed tickets.

Get List of Ticket's Messages

App connector: Gorgias • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step retrieves all conversation messages within each closed ticket, giving you complete context about customer interactions and resolution details.

For each closed ticket that passes the filter, this step automatically fetches all associated messages using the ticket ID. It connects to Gorgias and pulls the full conversation thread including customer messages, agent responses, and internal notes. The retrieved message data includes the actual text content and metadata that gets passed to the database creation step. This ensures your database contains not just ticket information but the complete conversation history.

Loop

App connector: Loop • Time to complete: 0 minutes (Auto-configured)
Why this matters: Since each ticket can contain multiple messages, this loop processes each message individually to create separate database entries for comprehensive analysis.

The loop takes the list of messages from step 3 and processes them one by one. For each message in the conversation thread, it prepares the data for database insertion including the ticket ID, message content, and closure timestamp. This allows you to analyze conversation patterns, response quality, and resolution details at the message level rather than just ticket level. The loop automatically handles tickets with varying numbers of messages.

database icon

Create Record

App connector: Data • Time to complete: 2 minutes
Why this matters: This final step saves each message to your database with structured fields, making your support data searchable and ready for reporting or analysis.

For each message processed by the loop, this step creates a new database record with three key fields: Support Ticket ID (the original ticket number), Message (the actual conversation text), and Closed Date (formatted timestamp of when the ticket was closed). You'll need to specify your database table name - the default is "Closed Gorgias Support Tickets" but you can customize this to match your naming conventions. The step automatically formats the closure date for proper database storage and strips unnecessary formatting from message text.

*Required: The following must be used with this workflow.

Ready to set this up? It only takes 6 minutes.

Our support team will even help you personalize this workflow for free.

Get started →

Make it your own!

Customize this workflow even further:

Set custom filters
Add additional filter conditions to capture specific ticket types, such as only tickets from certain channels, specific customer segments, or tickets that took longer than a certain time to resolve.
Connect to analytics tools
Extend the workflow to send ticket data to tools like Google Analytics, Mixpanel, or your business intelligence platform for deeper customer support performance analysis.
Store data in multiple formats
Branch the workflow to simultaneously save ticket data to different destinations like Google Sheets for quick viewing, your CRM for customer history, and a data warehouse for long-term analysis.
Deploy AI for sentiment analysis
Add an AI step that analyzes the message content for customer sentiment, satisfaction indicators, or common issue themes before saving to your database.

Common questions

What happens if I have a large backlog of closed tickets?

Can I modify which message fields get saved to the database?

Will this capture internal notes and private messages between agents?

Ready to save closed support tickets to your own database for analysis and reporting?

7-day free trial • 6 min setup • Cancel anytime

Need help? Our automation experts will help you personalize this workflow for free. Contact support