Skip to main content

Prerequisites

Before setting up Gorgias integration, ensure you have:

Gorgias Account

  • Active Gorgias account with API access
  • Gorgias API credentials (client ID, client secret, refresh token)
  • Admin permissions to install integrations

Vector Database

  • Pinecone account and API key for vector storage
  • Pinecone index created with appropriate dimensions
  • Understanding of vector embeddings concepts

AI Services

  • OpenAI API key for embeddings generation
  • Understanding of similarity search principles
  • Familiarity with RAG (Retrieval Augmented Generation)

Technical Setup

  • Node.js 16+ installed
  • Basic understanding of REST APIs and JavaScript
  • Access to your Gorgias ticket data for testing

Quickstart Guide

This is a quickstart guide to get you up and running with the Gorgias Ticket Embeddings. This guide will walk you through the steps to get your Gorgias ticket data into Pinecone and create embeddings for each ticket.

Authentication

Gorgias Ticket Embeddings

Once you have installed the app we can create embeddings and store your Gorgias ticket data in Pinecone, you can create embeddings for each ticket. Embeddings are vector representations of your ticket data. You can use these embeddings to find similar tickets or to create a recommendation system.
1

Loop Through Tickets

Loop Through Gorgias Ticket Data
2

Create Embeddings

Create embeddings for each ticket and message, and store in Pinecone
3

Store Chunks of Ticket Data

Store the vector representation of the ticket data in Pinecone and associated metadata with the ticket data
createTicketFeed does the setup: refresh the Gorgias OAuth token, request the first page of a saved view, and hand the resulting cursor to the pager. Fill in the credentials at the top from your own Gorgias app, and replace viewId with the id of the view you want to index — the value below is an example, not a default.

Page through tickets and upsert embeddings

getGorgiasTickets walks the cursor to the end of the view, embeds each ticket, and upserts the vectors into Pinecone under your namespace.
Ticket bodies are customer-written and routinely contain order numbers, email addresses and postal addresses. Embedding them ships that text to whichever embedding provider you configure, and a vector store is not covered by the same retention rules as your helpdesk. Strip or hash identifiers before the embedding call unless your provider agreement already covers customer content.

Conclusion

In this guide, we walked through the steps to get your Gorgias ticket data into Pinecone and create embeddings for each ticket. You can now use these embeddings to find similar tickets or to create a recommendation system. If you have any questions or need help, please feel free to reach out to us at support@stateset.com

Next steps

Knowledge base quickstart

Attaching the resulting knowledge to an agent.

RAG quickstart

Retrieval over the embeddings created here.

Knowledge API

Endpoint reference for storing and querying embeddings.

Multi-channel integration

Routing Gorgias tickets into an agent.
Last modified on August 31, 2026