FlowKit

Connecting Gorgias to n8n: automatically sort and route e-commerce support tickets

Published 31 August 2026 · 6 min read

An e-commerce site running on Gorgias gets its tickets from several channels at once — email, chat, social media, phone — all merged into a single view, with no native distinction between a question about clothing size and an urgent refund request from an angry customer. Gorgias does offer its own AI module (Gorgias Automate) to sort and auto-reply, but it's billed per ticket resolved by the AI, with closed-box logic you don't control. This guide shows how to wire n8n into Gorgias through its HTTP Integrations (its own take on webhooks) and its REST API, to classify each incoming ticket, tag it, and route urgent ones to Slack, without relying on Gorgias's own proprietary AI module.

Two ways to connect Gorgias to n8n

n8n has no native Gorgias node (n8n-nodes-base). There is a community node published on npm, but without the "verified" badge: installable only from Settings > Community Nodes on a self-hosted instance, unavailable on n8n Cloud — our guide to community nodes covers that distinction and the precautions worth taking before installing one.

This guide therefore takes the path that works everywhere, self-hosted and Cloud alike, and stays the easiest to audit over time: a Webhook Trigger to receive Gorgias's events, and the HTTP Request node to call the REST API back. If you haven't settled on a hosting choice yet, our self-hosted vs. Cloud comparison helps weigh that criterion against the others.

Generating and securing the API credentials

The Gorgias API authenticates over HTTP Basic: your account email as the username, your API key (generated from account settings) as the password, on a base URL shaped like https://your-domain.gorgias.com/api. Create an n8n credential of type "Header Auth" with the base64-encoded pair rather than pasting the key in plain text into every HTTP Request node: our guide to securing API credentials covers this practice, valid for any third-party service called without a dedicated node.

Configuring the HTTP Integration on the Gorgias side

In Settings > HTTP Integrations of your account, click "Add HTTP Integration," give it a clear name, then pick the triggering event(s): Ticket created for a brand-new ticket, Ticket message created to also react when a customer follows up on an existing ticket — that second event is the one worth checking for triage that covers the entire incoming stream. Paste your n8n Webhook Trigger's test URL to validate delivery, then swap it for the production URL once the workflow is active.

Unlike Crisp, whose webhooks are signed with HMAC, Gorgias's documentation doesn't detail an equivalent signature mechanism for its HTTP Integrations. The setup does let you add custom headers to every outgoing call, though: define one carrying a shared secret, and check its value in an IF node before processing anything — the general principle is the same one covered in our guide to securing n8n webhooks; only the verification mechanics differ.

Building the sorting workflow

The pipeline reuses a structure already proven on this blog for support ticket scoring, applied here to Gorgias's multi-channel stream:

  1. Webhook Trigger — receives every ticket_message_created event; an IF node checks the secret header, then filters on sender.role === "customer" to skip internal notes or agent-sent messages.
  2. AI node — sends the message content, plus the ticket's subject and originating channel, to an LLM with a structured output (urgency, category, one-sentence summary), on the model described in our guide to the Structured Output Parser.
  3. Switch — routes by urgency: a ticket classified as critical goes to Slack, on the pattern already documented for human approval via Slack; the rest are simply tagged so the support team finds them already sorted inside Gorgias.

Tagging and querying tickets through the REST API

To silently tag a ticket without notifying the customer — the most common action for automatic sorting — a PUT call on /api/tickets/{ticket_id}/tags with a tags array (e.g. [{"name": "refund"}, {"name": "urgent"}]) is enough; Gorgias responds 202 with no body, so there's no response payload to parse to confirm the operation.

For a nightly digest or weekly report that re-reads a whole period's worth of tickets, the GET /api/tickets endpoint uses cursor-based pagination, with a default limit of 30 results and a maximum of 100: explicitly passing limit=100 cuts the number of calls needed to walk the same volume by more than three, a principle covered in our guide to pagination with the HTTP Request node. Gorgias also exposes an X-Gorgias-Account-Api-Call-Limit header (formatted as used/limit) and a Retry-After header on a 429 — a budget shared across every tool connected to your account, worth watching like any API quota covered in our guide to rate limiting AI APIs.

Concrete use cases

  • Returns and refunds: a message mentioning "refund," "damaged package," or an order number gets tagged and routed into the workflow already documented in our guide to automating e-commerce returns, rather than waiting its turn in the general queue.
  • Disputes and chargebacks: a ticket mentioning a bank dispute feeds the same audit-trail process as our guide to handling Stripe chargebacks, with the Gorgias conversation history attached as evidence.
  • Stock shortages: before replying to a ticket about a product's availability, the workflow can query live stock levels synced through our guide to syncing Shopify stock, to tag the ticket with a "waiting on restock" status instead of a generic reply.

Pitfalls to avoid

  • Polling the API instead of using webhooks: every GET /api/tickets call eats into the account's shared quota, while an event pushed by an HTTP Integration costs nothing — always prefer the webhook for anything real-time.
  • Ignoring the rate limit headers: on an account running several active integrations (Gorgias Automate, a CRM, n8n), the call budget is shared across all of them; a burst of bulk tagging can trigger 429s if nothing reads Retry-After.
  • Not handling retries: like any webhook, a Gorgias call can be resent after a timeout on the n8n side; our guide to webhook idempotence avoids tagging or alerting twice on the same ticket.
  • Leaving the header secret in plain text inside the workflow: store it like any other n8n credential rather than hardcoding it into an IF node, so you can rotate it without republishing the workflow.

What the research says

Automating ticket classification instead of letting them pile up in arrival order isn't just a team convenience: a study by S. P. Paramesh and K. S. Shreedhara, "Automated IT Service Desk Systems Using Machine Learning Techniques" (2019), published by Springer, shows on more than 10,700 real-world tickets that an SVM model trained on ticket text reaches 89% classification accuracy, far ahead of manual triage by arrival order — the same principle applied here with an LLM instead of a purpose-trained model. On the automation itself, a study by Ahmed Raza Amir and Syed Muhammad Atif, "Evaluating Workflow Automation Efficiency Using n8n: A Small-Scale Business Case Study" (2026), measured, on a comparable notification pipeline, an execution time cut by more than 150x compared to equivalent manual processing, with the observed error rate dropping from 5% to zero — the kind of gain to expect here on a steady stream of tickets.

Going further

The urgency-based sorting and Slack alerting described here reuse the architecture already shipped in the Inbox AI Pack (€79), whose scoring and digest workflows adapt without a rewrite to a Gorgias ticket stream instead of a mailbox. If your priority is instead to document and prove compliance for this kind of processing, the Compliance & Audit Pack (€149) covers the matching audit trail, and the Complete FlowKit Bundle (€269 instead of €347) bundles all three for anyone who wants to cover both needs at once.

FAQ

Frequently asked questions

Do I need a native Gorgias node or the HTTP Request node?

n8n has no native Gorgias node (n8n-nodes-base). A community node exists on npm, but without the 'verified' badge: it only works on a self-hosted instance, not on n8n Cloud, and stops working the day its maintainer drops it. The HTTP Request node, combined with Gorgias's HTTP Integrations, works everywhere and covers most sorting and tagging needs.

How do I authenticate n8n against the Gorgias API?

Gorgias uses standard HTTP Basic authentication: your account email as the username, your API key as the password, on the base URL https://your-domain.gorgias.com/api. Create an n8n credential of type 'Header Auth' with the base64-encoded pair rather than pasting the key in plain text into every HTTP Request node.

How do I secure the Gorgias HTTP Integration, which has no native signature like Crisp?

Unlike some platforms that sign their calls (HMAC), Gorgias's documentation doesn't detail an equivalent signature mechanism for its HTTP Integrations. The setup does let you add custom headers, though: define one carrying a shared secret, and check its value in an IF or Code node before processing anything, to make sure a call really comes from Gorgias.

Bundle FlowKit Complet

€269