Zendesk Integration Guide

This guide will cover how to integrate data from your Zendesk account into flows in Cue.
Overview
- Requirements for Integration
- Authenticating Zendesk API requests
- Make API requests to Zendesk from a Cue Flow
- Find Zendesk tickets
- Create a Zendesk ticket
- Update or close a Zendesk ticket
Requirements for Integration
To set up this integration, you will need:
- Zendesk API Token: An API token and the email address of an active agent or administrator associated with your Zendesk account.
- Zendesk Subdomain: Your Zendesk domain (e.g.
yourcompany.zendesk.com
). - Cue Workspace Access: Access to "Flows" within your Cue workspace (e.g. an Admin role).
Authenticating Zendesk API requests
Once you have your Zendesk API token you can store it as an encrypted secret within with your flow and then use it when making HTTP Requests in your flow.
Add the Zendesk API token to your flow
- Open your flow
- Click the ⋮ icon in the top right corner of your screen and select Secrets
- Click Add secret
- In the Key field give your secret a name (e.g.
TOKEN
) - In the corresponding 'Value' field paste in your Zendesk API token
- Click Save
This saves your Zendesk API token in an encrypted format and now allows you to use it in HTTP requests by typing {{secrets.TOKEN}}
(or whatever you've named your key). When the HTTP step is executed, the above placeholder will be replaced with the actual API token you saved as a secret.
Use the Zendesk API token secret in an HTTP Request
To use your Zendesk API token secret in an HTTP Request you can do the following:
- Create an HTTP Request step in your flow and click on it to open the step settings panel.
- Expand the Authorization section and select Basic Auth from the drop-down.
- In the Username field put the email address you are using followed by
/token
for exampleyouremail@domain.com/token
- In the Password field put
{{secrets.TOKEN}}
- Set the remaining details for your HTTP request such as method, url, body etc and save the changes.
Now your HTTP step will use your Zendesk API token to make authenticated requests to your Zendesk account using the Basic Authentication process.
Make API requests to Zendesk from a Cue flow
Once you've got your Zendesk API key saved as a secret in your flow you can use it to make API requests to Zendesk API endpoints. Let's take a look at a few examples of what you can do with the Zendesk API now.
Find Zendesk tickets
Get a single ticket
To retrieve the details of an existing Zendesk ticket, you'll use the GET
method with the ticket's ID.
HTTP Method: GET
Request URL: https://{your_subdomain}.zendesk.com/api/v2/tickets/{ticket_id}.json
Replace {ticket_id}
with the actual ID of the ticket you want to retrieve.

Get a list of tickets
If you want to list all tickets you can make a GET request to the following URL:https://{your_subdomain}.zendesk.com/api/v2/tickets.json
See Zendesk's List Tickets API docs for more detail.
Create a Zendesk ticket
To create tickets we make POST requests to the following endpoint:https://{your_subdomain}.zendesk.com/api/v2/tickets.json
Below is a sample of the required JSON
{
"ticket": {
"subject": "Test ticket from Cue",
"comment": { "body": "This is a test ticket created via Cue" },
"priority": "normal"
}
}
and here is an example of how you would set up a request like this in your Cue flow:

If your request is successful you can extract the ticket_id
from the response to your request.

Update or close a Zendesk ticket
To update or close a ticket in Zendesk, send a PUT
request to:https://{your_subdomain}.zendesk.com/api/v2/tickets/{ticket_id}.json
Refer to the Zendesk Update Ticket API docs for details on which fields you can modify. For example, you can set the status
field to solved
if the issue has been resolved and closed
if the ticket is finalized and cannot be reopened.
You can also update the ticket’s priority, assignee, or add internal notes depending on your needs.
Save a Cue conversation transcript to a Zendesk ticket comment
If you want to save a Cue conversation transcript to a Zendesk ticket you can add a comment to a ticket by making a PUT request to the following endpoint:
https://{your_subdomain}.zendesk.com/api/v2/tickets/{ticket_id}.json
You can use the conversation.plainText
property in flows to produce an entire transcript of the conversation that can be passed into the body
property of the comment request body.
