Gorgias ACTION
Create Ticket Message
Create a message for a ticket in the Gorgias system. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Gorgias account once, then configure and run Create Ticket Message from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "gorgias_oauth-create-ticket-message",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
gorgias_oauth: { authProvisionId: "apn_xxxxxxx" },
ticketId: 10,
fromAgent: true,
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "gorgias_oauth-create-ticket-message",
"configured_props": {
"gorgias_oauth": { "authProvisionId": "apn_xxxxxxx" },
"ticketId": 10,
"fromAgent": true
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "gorgias_oauth",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "gorgias_oauth-create-ticket-message",
arguments: {
ticketId: 10,
fromAgent: true,
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
ticketId Ticket ID | integer | The ID of the ticket to add a message to Required Dynamic |
fromAgent From Agent | boolean | Whether the message was sent by your company to a customer, or the opposite Required |
fromUser From User | integer | User who sent the message Required Dynamic |
toUser To User | integer | The user receiving the message Required Dynamic |
fromCustomer From Customer | integer | The customer who sent the message Required Dynamic |
toCustomer To Customer | integer | The customer receiving the message Required Dynamic |
message Message | string | Message of the ticket. Accepts HTML Required |
bodyText Body Text | string | Plain-text version of the message, e.g. Thanks, your order has shipped. Optional |
fromAddress From Address (override) | string | If set, used as source.from.address instead of looking up the From User/Customer's email. Useful when sending on behalf of a shared inbox (e.g. support@example.com). Optional |
fromName From Name (override) | string | Optional display name for source.from. Optional |
toAddress To Address (override) | string | If set, used as source.to[0].address. Otherwise, agent messages on messaging channels (chat, Instagram DM, Messenger, WhatsApp, SMS, Twitter DM) use the source.from.address of the To Customer's latest message on that channel in the ticket (see List Ticket Messages), e.g. 92fc13f6-55b5-4ff3-85c3-dbaaad7366fb for chat, and everything else uses the To User/Customer's email. Optional |
toName To Name (override) | string | Optional display name for source.to[0]. Optional |
channel Channel | string | The channel used to send the message. Defaults to email Required |
via Via | string | How the message is sent from Gorgias. With help-center, Gorgias stores the message without sending it Required |
sourceType Source Type | string | How the message was sent or received. E.g. whatsapp-message, email Optional |
integrationId Integration ID | integer | The integration to send the message through, e.g. 123456. Run the List Integrations action to get the ID. If omitted, Gorgias uses the ticket's integration Optional |
subject Subject | string | The subject of the ticket Optional |
attachmentUrl Attachment URL | string | The URL to access to the attached file Optional |
attachmentName Attachment File Name | string | The name of the file to attach Optional |
sentDatetime Sent Datetime | string | When the message was sent. If ommited, the message will be sent by Gorgias. E.g. 2025-01-27T19:38:52.028Z Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- gorgias_oauth-create-ticket-message
- Version
- 0.3.0
- App
- Gorgias
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗