AI copilots and auto-responders are everywhere in support now. But most of them give generic, unhelpful answers because they only see the ticket text. They don't know who the customer is, what they've ordered, or what's happened in your systems. The difference between a bad AI integration and a good one is the data you feed it.
In this article we'll show you how to combine your own customer data with a GPT prompt and display the results in Zendesk right next to a ticket.
We'll do this using a no-code/low-code data pipeline tool called FactBranch and will show the results in FactBranch's Zendesk app so your agents can see the outputs when they open a ticket. You can also follow this video that walks you through the setup from start to finish.
Here is everything we'll talk about in the article:
If you've used ChatGPT before, you'll know that it's a bit like an assistant. If you give it the text of an article and a few questions, it will answer your questions. Or if you ask it to summarize the article, it will dutifully summarize the article. You can also give it a bunch of structured data (for example in the JSON format) and ask it questions about the data.
That's exactly what we can use it for in Zendesk. Here are a few ideas:
FactBranch is a no-code/low-code data pipeline tool to load data, transform data and create graphical user interfaces (GUIs) for support tools like Zendesk. We'll use FactBranch to load customer data from an SQL database. In the next step we'll write a prompt to GPT that includes the ticket text and the customer data we found and have GPT summarize the relevant data into three bullet points.
A data pipeline in FactBranch: Load customer and order data from a MySQL
database, ask ChatGPT about the data and display the results in the Zendesk app.
The cool thing about FactBranch in combination with ChatGPT is that you can use FactBranch to look up customer data in your SQL database, your API or your Google Sheet and then include that data in your ChatGPT prompt.
You can even include the ticket text and let GPT write a response that incorporates the customer data you've looked up in a previous step.
To follow this tutorial you'll need 3 accounts:
First, we'll create a new API key in your OpenAI account and save this API key securely to your FactBranch account.
Go to API keys in your OpenAI account and click "Create new secret key". Optionally enter a name for this key and click on "Create secret key". Copy the key you see in this dialog. Then head to the data sources list in your FactBranch account and click "Add data source". Click on "REST API" and select the authentication type "Bearer". Paste the API key you've just copied from OpenAI. Then rename the data source by clicking on "rename" next to "REST API" at the top of the page. Give the data source a name you'll recognize - like "OpenAI API key". Click "Save" to save the new name and click "Save" at the bottom of the page to save the API key.
In FactBranch data pipelines are called flows. A flow is triggered by an event sending data and then consists of a series of nodes that do something with the data.
In our case we want to display data in Zendesk Support. First go to your flows dashboard in FactBranch and create a new flow. Select "Show data in the FactBranch Zendesk app" and you'll see your newly created data pipeline consisting of a trigger and a display node.
Now add a node in which you look up the customer data you'd like to get. We have several tutorials on how to look up data from Google Sheets, MySQL, PostgreSQL, Microsoft SQL Server, Google BigQuery and a generic RESTful API.
If you don't want to look up customer data, you can also skip that step.
Now that you look up customer data, let's create a node that prompts GPT with your prompt and your data via OpenAI's API endpoint.
Create a "REST API" node and on the "Authentication" tab confirm that your data source (and with it your OpenAI API key) was automatically selected. If not, select it manually.
Then return to the "Request body" tab and select "POST" as the request method. Copy/paste the API endpoint you want to use:
https://api.openai.com/v1/chat/completions
Then, copy/paste the following request body as a starting point:
{
"model": "gpt-4o-mini",
"temperature": 1.0,
"messages": [
{
"role": "system",
"content": "You translate inputs into Shakespearean english."
},
{
"role": "user",
"content": "We are creating an API node that prompts GPT - a large language model."
}
]
}
If you click "Run", you should get an output like this:

Inside choices[0].message.content you'll find GPT's response to our prompt.
Now let's turn the prompt into something useful and include customer data that we've collected in the previous step.
This prompt is of course only an idea and a starting point for your own use case. But it should give you an idea how to use the system prompt, the user prompt and how to include data.
{
"model": "gpt-4o-mini",
"temperature": 0.3,
"messages": [
{
"role": "system",
"content": "Summarize data into 1 to 3 short bullet points that are relevant to the question. Only include data that's relevant to the question."
},
{
"role": "user",
"content": "Question: $trigger.data.ticket_description.escape_quotes() \n\nData: $nodes.mysql_3.data.escape_quotes()"
}
]
}
Basically in the system prompt we tell GPT what to do ("Summarize data into 1 to 3 short bullet points ...") and provide the user's question itself and the customer data in a user prompt.
Here's a more advanced example that drafts a complete response for the agent, incorporating the customer data:
{
"model": "gpt-4o",
"temperature": 0.3,
"messages": [
{
"role": "system",
"content": "You are a support agent assistant. Draft a short, friendly response to the customer's question. Use the provided customer data to give a specific, accurate answer. If the data doesn't contain the answer, say so honestly."
},
{
"role": "user",
"content": "Customer question: $trigger.data.ticket_description.escape_quotes() \n\nCustomer data: $nodes.mysql_3.data.escape_quotes()"
}
]
}
This second example uses gpt-4o for higher quality responses and asks the
model to draft a full reply rather than just a summary. Your agents can then
review, tweak, and send the draft — saving time while keeping a human in the
loop.
Let's dissect the user prompt:
Question: $trigger.data.ticket_description.escape_quotes() \n\nData: $nodes.mysql_3.data.escape_quotes()
$trigger.data.ticket_description addresses data from the trigger (what the
Zendesk app sends to FactBranch) and specifically the ticket's text (its
description).
Because we are inside a JSON string, we have to make sure any
quotes that are inside the ticket_description are escaped, and so we add the
transform function .escape_quotes().
Then we add two newlines: \n\n.
And then we include the customer data that we got from the database and escape
the quotes too: $nodes.mysql_3.data.escape_quotes().
There are many approaches to writing an effective prompt. In my experience shorter prompts work better. If your prompt is detailed and convoluted, GPT sometimes has a hard time figuring out what it should focus on and then ignores important parts of your prompt.
Describe what you want and not what you don't want.
The keyword "bullet points", in my experience, always produces a list of items - each on a new line. Every line starting with "- " or "1. ". This is a convenient way to get short sentences separated by a newline.
Play around with the temperature property. You can set it to a value between 0
and 1 and it's a measure of how consistent or creative the responses are. At 0
the model will return very similar responses to the same prompts. In my
experience for data analysis it's better to pick a lower temperature.
For the model, we recommend GPT-4o mini as a cost-effective default. It's fast, cheap, and handles most support use cases well. If you need higher quality reasoning — for example when drafting full responses or analysing complex data — upgrade to GPT-4o. It produces noticeably better results and is still affordable at scale.
Now that we have a response from GPT, let's show it in a simple app in Zendesk.
Head to the trigger config page inside the data pipeline in FactBranch and follow the instructions to install the Zendesk app.
Find the instructions to install the FactBranch Zendesk app on the trigger's
config page
Then return to the data pipeline in Zendesk and open the "Zendesk App Display node". On the top right you'll see the data from the previous node as it was returned by GPT.

Copy the full variable path from the input data. We'll use this in our template in a minute.
<div class="c_fbzd_item">
<div class="c_fbzd_item__label">Summary</div>
<div class="c_fbzd_item__value">
<ul>
{% for line in nodes.rest_api_10.data.choices[0].message.content.split("\n") %}
<li>
{{ line[2:] }}
</li>
{% endfor %}
</ul>
</div>
</div>
We use a few tricks here.
We split the message we got from GPT by the newline symbol \n and loop over
each line. Splitting is done by appending the .split("\n") function.
And then, because we asked GPT to return a bullet point list, every line starts
with either "- " or with "1. ", "2. ", etc. And so we get rid of the first two
characters by outputting line[2:].
Once you've done all that and the output panel shows a nice preview, you'll see something like this in your Zendesk tickets:

That's all it takes to task a state-of-the-art AI with analysing your data and showing the results to your agents automatically.
Every support team is being pitched AI tools right now. But here's what most vendors won't tell you: an AI that can only see the ticket text is barely more useful than a template. It doesn't know the customer, their order history, their account status, or what's actually happening in your systems.
The moment you feed real customer data into your AI prompt, the quality of the output changes dramatically. Instead of "I'd be happy to help you with your order", you get "Your order #4821 shipped on March 3rd and is currently in transit with an estimated delivery of March 11th." That kind of specificity directly impacts your key support KPIs — resolution time drops and first-contact resolution goes up.
That's the gap FactBranch fills. It connects to your databases, APIs, and spreadsheets, pulls in the relevant customer data, and feeds it straight into your AI prompt — all without writing code. If you're looking for more ways to bring external data into Zendesk, check out our list of the best Zendesk integrations for external customer data.
You should always show the raw data alongside the summary or any analysis you let GPT do. GPT is very good, but it can still hallucinate details that aren't in the data.
If you are using this at scale, roll out the Zendesk app to some agents first and monitor your costs in your OpenAI account. With GPT-4o mini, costs are very manageable even at high volumes. GPT-4o is more expensive but still reasonable — check OpenAI's pricing page for current rates.
Don't forget to check out our docs to learn more about the templating language to build apps with FactBranch.
In this step-by-step tutorial you'll learn how to trigger a flow in FactBranch whenever a new ticket is created in Zendesk.
In this step-by-step guide you'll learn how to query your Google BigQuery datasets and databases with the no-code/low-code tool FactBranch and display...
In this step-by-step tutorial you'll learn how to query your MySQL database with the low-code tool FactBranch and display the results in Zendesk Suppo...
In this step-by-step tutorial you'll learn how to query your PostgreSQL database with the no-code/low-code tool FactBranch and display the results in ...
Sign up for our newsletter to get our freshest insights and product updates.
We care about the protection of your data. Read our Privacy Policy.