Easily add AI to your Zendesk Help Center - Dust Apps Example #1

Easily add AI to your Zendesk Help Center - Dust Apps Example #1

At Dust, our goal is to let you add AI to your company's life by making sure you get accurate answers from LLM models using your data. For that, we're building strong connectors that sync and organize data continuously to feed them at the right time when you're using one of your assistants.

The thing is that because we're building strong, secure and reliable connectors, it takes a little time. And you might need a connector that doesn't exist on Dust yet.

That's where Dust Apps come into play. Dust apps allow you to gather the right data from anywhere and let Dust do the rest.

Dust Apps are basically a list of blocks (curl, chat, data sources, code, etc.) that run one after the other, using each's other results to run. So the possibilities are pretty much unlimited.

Here, we'll see a short example of how to get human-like answers from your Zendesk Help Center without having to browse articles for 15 minutes to find the paragraph that holds the answer to your question.

Demo of the app we're building in this article

TLDR; At the end of this article, you will find a link to the Dust App that we are building and be able to clone it.

Build your first app: Talk to your Zendesk Help center as if it was a human

The Dust App we will build in this article searches an answer to the user's questions in your Zendesk's Help Center and answers with the right context.

This can work for your employees if you use Zendesk's Help Center internally to store company information or externally if you want users to be able to interact easily with your help center. Let's do this!

Add your LLM providers

To create a Dust App, you need at least a Builder profile on Dust. You can then head to the builder menu, then click on "Developer tools".

Because Dust Apps can be used programmatically, we allow you to add your own LLM providers keys, as well as a few other services. You need to go to the 'Providers' tab and add the API keys of the LLM providers you might want to use.

Once done, head to My Apps tab and click on Create App. Name it, mark it private, and we're on the way!

Add an INPUT block

The first thing you want to do is to add an INPUT block. This will be the starting point of your application, passing its data to the rest of the blocks.

This block is a special one, because of the 2 possible ways to use Dust Apps:

  • Directly from our API by providing data as parameters and let it run
  • From Dust @assistants that will infer the data fed to the app from the user's input, using the descriptions of the fields in your INPUT's block dataset.

Here we will use the Dust App from an assistant, so we need to create a Dataset and add query_string as the only argument in the schema.

You will then be able to add data entries to your dataset, which in our case will only be used to try your Dust App, as if a user was asking these questions directly to the app.

Back to your INPUT block, select the dataset you just created.

If you hit Run now, you can see in the output of that block the 3 questions we asked in the dataset.

Add a 'Search in Zendesk' block

Add a new cURL block to our app to send a request to the Zendesk API:

Choose the GET method, and point to this URL :

YOUR_ZENDESK_URL.zendesk.com/api/v2/help_center/articles/search.json?query=${INPUT.query_string}
  • Replace YOUR_ZENDESK_URL by your actual Zendesk Help Center URL
  • The ${INPUT.query_string} variable will use the output from the preceding INPUT block

In the header section, add this code:

_fun = (env) => {
return {"Content-Type": "application/json", "Authorization": "Basic YOUR_BASE64_API_KEY_HERE"};
}
  • Replace YOUR_BASE64_API_KEY_HERE by a base64 encoded version of: youremail@address.com/token:YOUR_ZENDESK_API_KEY

To generate your Zendesk API key. See the "Generating API tokens" part of this article

Leave the body section to null like so:

_fun = (env) => {
return null
}

If the questions you asked in your dataset are related to the content of your help center and your Zendesk API connection works, you should now be able to click on "Run" and see some results in the Zendesk block.

Extract the search results

We will then take the first result of Zendesk's search and feed it to an LLM to find the answer to our question.

Create a CODE block that will extract the content of the first article found by the cURL block:

Notice how we're using env.state.ZENDESK_SEARCH to loop through the previous block's results.

In this example we only take 1 article for simplicity, but in the actual app that you will be able to duplicate, we summarize the answers of different 3 articles to make sure we get the right answer.

Answer the question using the search results

Create a CHAT block and use the SEARCH_EXTRACT block's output to query an LLM with a prompt that allows answering the question accurately.

Your app is ready! You can now either use it from the API by clicking on the "View API endpoint" button, or use it through an assistant directly in the Dust webapp.

Create a new assistant with a simple set of instructions:

In the Actions & datasources tab, pick "Run a dust app", then find the app you just created and select it.

Name and describe your assistant.

You can now use it to ask questions to your Zendesk Help Center and get clear, human like answers with reference links to the actual full-size article.

All done! Don't want to do it from scratch? Duplicate our existing demo app.

We have an existing app that does exactly what we described in this article, and you can duplicate it by clicking here.

Want to know more about Dust?

Don't hesitate to reach out or try it free for 14 days on Dust.tt