Automatically classify Gmail support emails with OpenAI, create or update Zendesk tickets, and notify Slack via Make.com. Setup, prompts and practical mappings.
Introduction
Support teams lose time when every inbound email needs a human to decide category, priority, and owner. You open Gmail, read, tag, assign, then create a Zendesk ticket, often retyping the same information. That delays first response and makes ticket routing inconsistent.
This guide shows how to use Make.com to automatically classify incoming Gmail messages with OpenAI, create or update a Zendesk ticket with the classification, and send a concise Slack alert to the right channel or assignee. By the end you will have a working scenario you can test and tune for tone, categories, and escalation rules.
What you will know by the end: the exact Make.com modules to use, the OpenAI prompt pattern that produces reliable labels, field mappings from Gmail to Zendesk, and the de-duplication rules to avoid duplicate tickets.
What You'll Need
- A Gmail account authorised in Make.com with read access to the support inbox
- An OpenAI API key accessible from Make.com via HTTP or the OpenAI connector
- A Zendesk account with API credentials and permission to create tickets
- A Slack workspace and channel where alerts will be posted
- A Make.com account with connections to Gmail, Zendesk, Slack, and HTTP/OpenAI
- Permission to create custom ticket fields in Zendesk if you want to store classification metadata
Notes: OpenAI costs depend on usage and model. For production classification use a deterministic model setting and rate-limit requests to control costs.
How It Works (The Logic)
Trigger: New message in Gmail support label. Make.com fetches the email, extracts relevant parts, sends a short prompt to OpenAI to return a category, priority, and suggested assignee. Make.com maps those outputs into Zendesk ticket fields, creates or updates a ticket, and posts a Slack message if the ticket meets your notification rules.
In plain terms: Gmail new message → extract subject/body/attachments → OpenAI classify and suggest routing → Zendesk create/update ticket → Slack notify.
Step-by-Step Setup
- Define your classification schema
Decide the categories you want the model to return, for example: Billing, Technical, Account Management, Feature Request, Abuse. Also decide priority levels (P1, P2, P3) and whether you want the model to suggest an assignee or team.
Keep the options fixed and enumerable. The OpenAI prompt will ask the model to respond in a strict JSON structure using only those values.
- Create a new Scenario in Make.com and add the Gmail trigger
Module: Gmail - Watch emails (Label or Query). Point it at your support label or use a search query like "label:support AND is:unread".
Settings: set the trigger to only fetch unread messages so the scenario handles each email once. For high volume, set batching or use a short polling interval.
- Extract and normalise email content
Add the Gmail module output mapping. Pull these fields into variables:
- message_id
- thread_id
- subject
- from (name and email)
- body_plain or snippet
- attachments metadata (if present)
Sanitise the body: remove long quoted replies using a simple split on common reply separators or use the first 1,200 characters as the classification input. Too long prompts raise cost and introduce noise.
- Build the OpenAI prompt and call the model
Module: HTTP - Make a request to the OpenAI API or use the OpenAI connector if available.
Prompt guidance (system + user instruction):
- System: You are a support triage assistant. Reply only in JSON with keys: category, priority, assignee, quick_summary. Allowed categories: [Billing, Technical, Account, Feature Request, Abuse]. Allowed priorities: [P1, P2, P3]. Assignee should be one of: [support_team, billing_team, engineering_team]. quick_summary: one short sentence.
- User: Provide the subject and the first 1,200 characters of the email body. Ask the model to prefer conservative categories and mark uncategorisable emails as "Account" by default.
Example user string: "Subject: {{subject}}\nBody: {{body_snippet}}\nReturn JSON only."
API params: set temperature to 0.0 for consistent labels, max_tokens around 200, and choose an appropriately priced model that meets latency and accuracy needs.
Gotcha: enforce a strict JSON response in the prompt and validate the response in Make.com. If parsing fails, fallback to a default classification.
- Parse and validate OpenAI output
Add a JSON parse or text parse step. Validate that category is in your allowed list and priority matches allowed values. If validation fails, set category to "Account" and priority to "P3" and flag classification_manual_review = true.
- Check for existing Zendesk ticket to prevent duplicates
Before creating a ticket, search Zendesk for an open ticket in the same thread or from the same sender with a recent timestamp. Module: Zendesk - Search tickets. Use thread_id or subject match heuristics.
If you find a ticket, append a comment to that ticket instead of creating a new ticket. If none found, proceed to create.
- Create or update the Zendesk ticket
Module: Zendesk - Create a Ticket or Update Ticket.
Map fields:
- Subject: {{subject}}
- Description: include the cleaned body snippet plus an attribution block: "From: {{from_name}} <{{from_email}}>"
- Requester: create or use existing requester by email using Zendesk people create/search
- Priority: map from OpenAI priority (map P1→urgent, P2→high, P3→normal according to your Zendesk settings)
- Tags or custom fields: set triage_category = category, triage_assignee_suggestion = assignee, triage_summary = quick_summary
- Attachments: if the email had attachments, upload and attach them to the ticket
Common gotcha: Zendesk custom fields use numeric IDs. Create the fields first and map the numeric key in Make.com.
- Route or assign based on classification
Add a router in Make.com:
- If category == "Billing" route to billing_team channel and set assignee to the billing queue
- If category == "Technical" and priority == "P1" route to oncall or engineering_channel and set escalation flags
- Else create the ticket in the support queue
Implement assignment by updating the ticket assignee ID or adding a tag that your Zendesk triggers use to auto-assign.
- Post a Slack notification for actionable tickets
Module: Slack - Post a message. Post only for P1s or for categories that require immediate human attention.
Message template:
:rotating_light: New P1 support ticket
Category: {{category}}
Requester: {{from_name}} ({{from_email}})
Subject: {{subject}}
Quick summary: {{quick_summary}}
Zendesk: <https://{{your_zendesk_domain}}/agent/tickets/{{ticket_id}}|Open ticket>
Keep the channel focused. For engineering alerts include a direct mention of the on-call user or team channel.
- Log the classification and ticket IDs
Add a Google Sheets or Airtable row to keep an audit: message_id, thread_id, classification JSON, ticket_id, timestamp, model_used, and parse_status. This helps tune prompt accuracy and track model usage for cost control.
- Test with representative emails
Send sample emails for each category and for edge cases: long threads, attached error logs, and vague requests. Verify OpenAI returns valid JSON, Zendesk tickets are correctly created or updated, and Slack notifications hit the intended channels.
Tune the prompt and parsing rules until classification accuracy is acceptable for your SLA.
Real-World Business Scenario
A SaaS support team used this workflow to triage their shared inbox. Before automation, engineers read many low-value emails. After deployment, the automation classified roughly 70 percent of inbound messages correctly, routed clear technical P1s to the engineering on-call channel, and appended others to an agent queue. The team removed 40 minutes of manual triage per day and improved mean time to first response for P1s.
We often pair this pattern with other Make.com automations such as document generation or task handoffs. For example, you might generate a PDF report from an email and attach it to a ticket using the pattern in Generate a PDF from a Google Docs Template Using Make.com and Gmail. For routing handoffs into team workflows see How to Automatically Notify Slack When a ClickUp Task Changes Status Using Make.com for related routing strategies.
Common Variations
- Use a simpler classifier: replace OpenAI with a rules engine or keyword match for very high volume, then reserve OpenAI for ambiguous messages.
- Add sentiment scoring: have the model return sentiment and include it in ticket priority or escalation rules.
- Multi-model fallback: if OpenAI fails or returns low confidence, call a smaller faster model first, then escalate to a larger model for ambiguous results.
Putting it into action
You now have a practical, intermediate Make.com pattern to classify inbound Gmail messages with OpenAI, create or update Zendesk tickets, and notify Slack. If you want help building, tuning prompts, or wiring Zendesk custom fields and routing rules, Olmec Dynamics builds these automations for real businesses. See what we do at https://olmecdynamics.com.