Integrations / Gorgias
Gorgias
Gorgias helpdesk for online stores: list, read, create and update tickets, read and send messages, look up customers.
8 actions
API key
5 read3 write
Calls gorgias.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "gorgias" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Create ticketwritegorgias.create_ticketCreate a ticket for a customer with a first message. The message is recorded as sent by the customer (an incoming message).
| Input | Type | Description | |
|---|---|---|---|
customer_email | string | Required | Customer email address |
subject | string | Required | Ticket subject |
message | string | Required | Text of the first message |
channel | string | Required | Channel of the message |
await setu.execute({
userId: "user_1",
action: "gorgias.create_ticket",
input: {
"customer_email": "<customer_email>",
"subject": "<subject>",
"message": "<message>",
"channel": "<channel>"
},
});Get customerreadgorgias.get_customerGet one customer by ID, including contact channels and notes.
| Input | Type | Description | |
|---|---|---|---|
customer_id | integer | Required | Customer ID |
await setu.execute({
userId: "user_1",
action: "gorgias.get_customer",
input: {
"customer_id": 1
},
});Get ticketreadgorgias.get_ticketGet one ticket by ID with its customer, status, priority, channel and tags.
| Input | Type | Description | |
|---|---|---|---|
ticket_id | integer | Required | Ticket ID |
await setu.execute({
userId: "user_1",
action: "gorgias.get_ticket",
input: {
"ticket_id": 1
},
});List customersreadgorgias.list_customersList customers, optionally filtered by exact email or name. Returns the customer records as Gorgias sends them.
| Input | Type | Description | |
|---|---|---|---|
email | string | Optional | Exact email to match |
name | string | Optional | Name to match |
limit | integer | Optional | Customers to return (max 100) |
cursor | string | Optional | Cursor from a previous response |
await setu.execute({
userId: "user_1",
action: "gorgias.list_customers",
input: {},
});List messagesreadgorgias.list_messagesList messages (customer messages, agent replies and internal notes), optionally only those of one ticket.
| Input | Type | Description | |
|---|---|---|---|
ticket_id | integer | Optional | Only messages of this ticket |
limit | integer | Optional | Messages to return (max 100) |
cursor | string | Optional | Cursor from a previous response |
await setu.execute({
userId: "user_1",
action: "gorgias.list_messages",
input: {},
});List ticketsreadgorgias.list_ticketsList tickets, newest first, optionally for one customer. Returns a cursor for the next page.
| Input | Type | Description | |
|---|---|---|---|
customer_id | integer | Optional | Only tickets of this customer |
limit | integer | Optional | Tickets to return (max 100) |
cursor | string | Optional | Cursor from a previous response to get the next page |
order_by | string | Optional | Sort order |
await setu.execute({
userId: "user_1",
action: "gorgias.list_tickets",
input: {},
});Reply to ticket by emailwritegorgias.reply_to_ticketSend an agent email reply on a ticket. The sender must be the email of a Gorgias user with an email integration; the receiver is the customer.
| Input | Type | Description | |
|---|---|---|---|
ticket_id | integer | Required | Ticket ID |
body_text | string | Required | Reply text |
from_address | string | Required | Email address the reply is sent from (a connected support address) |
to_address | string | Required | Customer email address to send the reply to |
subject | string | Optional | Subject line of the reply |
await setu.execute({
userId: "user_1",
action: "gorgias.reply_to_ticket",
input: {
"ticket_id": 1,
"body_text": "<body_text>",
"from_address": "<from_address>",
"to_address": "<to_address>"
},
});Update ticketwritegorgias.update_ticketChange a ticket's status (open or closed), priority or subject, or mark it as spam.
| Input | Type | Description | |
|---|---|---|---|
ticket_id | integer | Required | Ticket ID |
status | string | Optional | New status |
priority | string | Optional | New priority |
subject | string | Optional | New subject |
spam | boolean | Optional | Mark the ticket as spam |
await setu.execute({
userId: "user_1",
action: "gorgias.update_ticket",
input: {
"ticket_id": 1
},
});