Gorgias

Learn how to use Gorgias with Composio

Overview

SLUG: GORGIAS

Description

Gorgias is a helpdesk and live chat platform specializing in e-commerce, offering automated support, order management, and unified customer communication

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to openid,email,profile,offline,write:all
bearer_token
string
subdomain
stringRequired

Connecting to Gorgias

Create an auth config

Use the dashboard to create an auth config for the Gorgias toolkit. This allows you to connect multiple Gorgias accounts to Composio for agents to use.

1

Select App

Navigate to Gorgias.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Gorgias Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using OAuth2

1from composio import Composio
2
3# Replace these with your actual values
4gorgias_auth_config_id = "ac_YOUR_GORGIAS_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/application
6
7composio = Composio()
8
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 connection_request = composio.connected_accounts.initiate(
12 user_id=user_id,
13 auth_config_id=auth_config_id,
14 )
15
16 print(
17 f"Visit this URL to authenticate Gorgias: {connection_request.redirect_url}"
18 )
19
20 # This will wait for the auth flow to be completed
21 connection_request.wait_for_connection(timeout=15)
22 return connection_request.id
23
24
25connection_id = authenticate_toolkit(user_id, gorgias_auth_config_id)
26
27# You can also verify the connection status using:
28connected_account = composio.connected_accounts.get(connection_id)
29print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Gorgias toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["GORGIAS"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: List Teams

Description

Lists teams in gorgias.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add Ticket Tags

Description

Adds tags to a ticket in gorgias.

Action Parameters

tag_ids
arrayRequired
ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Account Setting

Description

Creates a new account setting in gorgias.

Action Parameters

description
string
name
stringRequired
value
Required

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Customer

Description

Creates a new customer in gorgias.

Action Parameters

address
object
channels
array
data
object
email
string
external_id
string
name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Team

Description

Creates a new team in gorgias.

Action Parameters

decoration
object
description
string
members
array
name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Ticket

Description

Creates a new ticket in gorgias.

Action Parameters

assignee_team_id
integer
assignee_user_id
integer
channel
string
customer_id
integerRequired
external_id
string
language
string
messages
array
meta
object
priority
string
status
string
subject
string
tags
array
via
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Customer

Description

Deletes a specific customer from gorgias.

Action Parameters

customer_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Customers

Description

Deletes multiple customers from gorgias.

Action Parameters

customer_ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Customer Field Value

Description

Deletes a specific field value for a customer in gorgias.

Action Parameters

customer_id
integerRequired
field_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Team

Description

Deletes a specific team from gorgias.

Action Parameters

team_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Ticket

Description

Deletes a specific ticket from gorgias.

Action Parameters

ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Ticket Field Value

Description

Deletes a specific field value for a ticket in gorgias.

Action Parameters

field_id
integerRequired
ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Account

Description

Retrieves your gorgias account information.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Customer

Description

Retrieves a specific customer from gorgias.

Action Parameters

customer_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Event

Description

Retrieves a specific event from gorgias.

Action Parameters

event_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Team

Description

Retrieves a specific team from gorgias.

Action Parameters

team_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Ticket

Description

Retrieves a specific ticket from gorgias.

Action Parameters

ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Account Settings

Description

Lists all account settings in gorgias.

Action Parameters

limit
integer
offset
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Customers

Description

Lists customers in gorgias with various filtering options.

Action Parameters

created_from
string
created_to
string
email
string
external_id
string
limit
integer
name
string
offset
integer
order_by
string
order_dir
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Customer Field Values

Description

Lists all field values for a customer in gorgias.

Action Parameters

customer_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Events

Description

Lists events in gorgias with various filtering options.

Action Parameters

context
string
created_from
string
created_to
string
limit
integer
object_id
integer
object_type
string
offset
integer
type
string
user_id
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Tickets

Description

Lists tickets in gorgias with various filtering options.

Action Parameters

assignee_team_id
integer
assignee_user_id
integer
channel
string
created_from
string
created_to
string
customer_id
integer
external_id
string
language
string
limit
integer
offset
integer
order_by
string
order_dir
string
priority
string
status
string
tag_id
integer
updated_from
string
updated_to
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Ticket Field Values

Description

Lists all field values for a ticket in gorgias.

Action Parameters

ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Ticket Tags

Description

Lists all tags for a ticket in gorgias.

Action Parameters

ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Merge Customers

Description

Merges two customers in gorgias, combining their data and history.

Action Parameters

source_customer_id
integerRequired
target_customer_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove Ticket Tags

Description

Removes tags from a ticket in gorgias.

Action Parameters

tag_ids
arrayRequired
ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Set Customer Data

Description

Sets the complete data object for a customer in gorgias.

Action Parameters

customer_id
integerRequired
data
objectRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Set Ticket Tags

Description

Sets the complete list of tags for a ticket in gorgias.

Action Parameters

tag_ids
arrayRequired
ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Account Setting

Description

Updates an existing account setting in gorgias.

Action Parameters

description
string
setting_id
integerRequired
value
Required

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Customer

Description

Updates an existing customer in gorgias.

Action Parameters

address
object
channels
array
customer_id
integerRequired
data
object
email
string
external_id
string
name
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Team

Description

Updates an existing team in gorgias.

Action Parameters

decoration
object
description
string
members
array
name
string
team_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Ticket

Description

Updates an existing ticket in gorgias.

Action Parameters

assignee_team_id
integer
assignee_user_id
integer
customer_id
integer
external_id
string
language
string
meta
object
priority
string
status
string
subject
string
ticket_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired