CORTEXFLOW · FREE FOREVER

Chatbots

Multi-Channel Support Ticket Triage

↓ Download workflow JSON

Import in n8n: Workflows → ⋯ → Import from file, then add your credentials. Free download with a free account.

How it works

  1. New Ticket Webhook — receives a ticket as JSON (id, subject, body, channel) from any channel: a web form, an email parser, or a chat widget.
  2. Classify Ticket (AI) — asks GPT to return strict JSON with a priority (P1–P4), a category, and a one-line summary.
  3. Route by Priority — a Switch node reads the AI’s priority and sends the ticket down the P1, P2, P3, or P4 branch.
  4. Set Queue — each branch assigns its support queue (P1 goes to urgent-support, P4 to support-backlog) and keeps the AI’s classification.
  5. IF P1 Urgent — on the P1 branch, confirms the priority before anything customer-visible happens.
  6. Slack Urgent Alert — P1 tickets post an urgent alert to your on-call channel with the ticket ID, category, and summary.
  7. Update Ticket System — PUTs the queue, priority, category, and AI summary back to your ticketing API.
  8. SLA Check Timer — a second, independent chain that runs every 15 minutes.
  9. Read Open Tickets — pulls open tickets and their SLA deadlines from Google Sheets.
  10. IF SLA Breached — compares each ticket’s deadline against the current time.
  11. Slack SLA Escalation — posts breached tickets to your channel so nothing slips past its deadline.

Set up steps

You’ll need:

  • n8n (self-hosted or cloud) with webhook access
  • An OpenAI account — get an API key at platform.openai.com → API keys
  • A ticketing system with an API (Zendesk, Intercom, Freshdesk, or your own) — the workflow PUTs to https://api.your-ticket-system.com/v1/tickets/{id}; you will point it at your real endpoint
  • A Google Sheet tracking open tickets, with columns ticket_id, subject, sla_deadline (ISO timestamps), and status
  • A Slack workspace for the alert channels
  1. Download the workflow JSON using the download button on this page.
  2. In n8n, go to Workflows → ⋯ → Import from file and select the JSON.
  3. Create your OpenAI credential — in n8n go to Credentials → New → OpenAI, paste your API key, and save. Then open Classify Ticket (AI) and select your credential.
  4. Point at your ticket system — open Update Ticket System, replace the placeholder URL with your real API endpoint, and add authentication (for example, an HTTP Header Auth credential holding your Zendesk or Intercom API token).
  5. Connect Google Sheets — in n8n go to Credentials → New → Google Sheets, connect via OAuth, and save. Then open Read Open Tickets, select your spreadsheet and sheet, and check the column names match.
  6. Create your Slack credential — in n8n go to Credentials → New → Slack, connect via OAuth, and save. Then open both Slack nodes, select your credential, and set your channel names.
  7. Activate the workflow (toggle, top-right), then POST a test ticket to the webhook URL shown in New Ticket Webhook.

Customize it

  • Match your queues — edit the four Set Queue nodes so the queue names match your team’s real queues.
  • Tune the classification — edit the system prompt in Classify Ticket (AI) to use your real categories (billing, bug, feature-request) and your own priority definitions.
  • Change the SLA cadence — edit the cron expression in SLA Check Timer (currently every 15 minutes).
  • Auto-reply to low-priority tickets — add an email or chat send node on the P4 branch so simple tickets get an instant acknowledgement while the team focuses on P1s.

Workflow nodes

This workflow is built from 14 nodes. Here's what each one does:

#NodeTypeWhat it does
1 New Ticket Webhook Webhook Entry point — receives incoming HTTP requests that trigger the workflow.
2 Classify Ticket (AI) OpenAI Sends a prompt to OpenAI and returns the AI's answer.
3 Route by Priority Switch Routes items to one of several outputs based on rules.
4 Set Queue - P1 Set Holds editable configuration values — fill in your own settings here before activating.
5 Set Queue - P2 Set Holds editable configuration values — fill in your own settings here before activating.
6 Set Queue - P3 Set Holds editable configuration values — fill in your own settings here before activating.
7 Set Queue - P4 Set Holds editable configuration values — fill in your own settings here before activating.
8 IF P1 Urgent IF Splits the flow into branches based on a condition.
9 Slack Urgent Alert Slack Posts messages or reads data in Slack.
10 Update Ticket System HTTP Request Calls an external API or webhook endpoint.
11 SLA Check Timer Schedule Trigger Starts the workflow automatically on a schedule.
12 Read Open Tickets Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
13 IF SLA Breached IF Splits the flow into branches based on a condition.
14 Slack SLA Escalation Slack Posts messages or reads data in Slack.

Setup instructions

1. Add your credentials

In n8n go to Credentials → New, create each credential below, then open the named node and select it:

NodeCredential to add
Classify Ticket (AI) OpenAI API
Slack Urgent Alert Slack OAuth2
Read Open Tickets Google Sheets OAuth2
Slack SLA Escalation Slack OAuth2

How this workflow starts

  • Webhook: Listens on path /cortexflow-ticket — copy the production URL from the node after activating the workflow.
  • Schedule Trigger: Runs every cron.

Use cases

Support tickets arrive faster than humans can read them, and the expensive failure is always the same: an urgent ticket sitting in the general queue while someone answers password resets first. This template reads every ticket the moment it arrives and puts it where it belongs. A webhook accepts each ticket as JSON with an id, subject, body, and channel, from any source: a web form, an email parser, or a chat widget. Classify Ticket (AI) returns strict JSON with a priority from P1 to P4, a category, and a one-line summary. A Switch routes by priority into real queues: P1 to urgent-support, P4 to support-backlog. On the P1 branch, IF P1 Urgent confirms the priority before anything customer-visible happens, then Slack Urgent Alert posts the ticket ID, category, and summary to the on-call channel, and Update Ticket System PUTs the queue, priority, category, and summary back to the ticketing API. A second, independent chain keeps watch over time: the SLA Check Timer runs every 15 minutes, Read Open Tickets pulls open tickets and their sla deadline values from Google Sheets, IF SLA Breached compares each deadline against the current time, and Slack SLA Escalation posts the breached tickets to the channel so nothing slips past its deadline. It is built for support teams that need urgent things to be urgent and slow things to never be forgotten.

The six-person SaaS support team

A B2B SaaS company with six support agents gets tickets from Intercom, email, and an in-app widget, all POSTed to the webhook in the same shape. Before the workflow, triage was whoever happened to be online; now P1s, a production outage or a data-loss report, hit the urgent-support queue and the on-call Slack channel within seconds. P4s, mostly how-to questions, wait in support-backlog for quiet hours.

  • Variation: tune the classification prompt in Classify Ticket (AI) with the team's real categories, such as billing, bug, and feature request, plus the team's own priority definitions, so the AI's judgment matches the team's.

The hosting provider's overnight shift

A small hosting provider has one engineer on call overnight and a hard 30-minute response SLA on critical tickets. The SLA chain is the real product here: every 15 minutes it scans the open-ticket sheet, and anything past its sla deadline posts to Slack as an escalation with the ticket ID and subject.

  • Variation: tighten the SLA Check Timer cron during known incident windows, or loosen it to hourly for the low-priority queues where a 15-minute check is overkill.

The mobile app studio the week after launch

An app studio launches a new release and the ticket spike is chaos: crash reports, confused users, and feature requests all arriving as the same shapeless inbox. The AI classification sorts the chaos in real time. Crash reports with stack traces go P1 to urgent-support with a Slack alert; confused-user tickets go P2 or P3 with a category of usability; feature requests go P4 to support-backlog for the next sprint review.

  • Variation: add an acknowledgement node on the P4 branch so simple tickets get an instant we have logged this reply while the team stays focused on the P1s.

The fintech support desk with compliance queues

A fintech startup's support tickets carry regulatory weight: a disputed transaction must reach the compliance queue, not the general one, and response times are audited. The category field from the AI classification drives that routing, and Update Ticket System writes the queue, priority, category, and summary back into the ticketing platform, so the audit trail lives in the system of record, not just in n8n.

  • Variation: extend the classification prompt with the company's regulatory categories and make the P1 branch require the IF P1 Urgent confirmation to stay strict, since a false P1 pages the compliance officer.

The marketplace with buyer and seller tickets

A two-sided marketplace gets tickets from both buyers and sellers through the same web form, and the two sides need different teams. The channel field in the webhook JSON carries which side the ticket came from, so the Switch routing can consider it alongside priority: a P1 from a seller whose payouts are stuck goes to the seller-ops queue with a Slack alert, while a P1 from a buyer with a failed payment goes to the payments queue.

  • Variation: split the Set Queue nodes by channel first and priority second if the marketplace grows, giving each side its own P1 to P4 ladder instead of one shared ladder.

← All templates