Algolia for Zendesk
Improve your help center search experience with Algolia. The Algolia integration syncs your Zendesk Guide articles with Algolia, providing instant search results.
Create a new Zendesk API key
First, you need to create a new API key in your Zendesk account. These credentials will be used to connect your Zendesk account to Algolia.
-
Go to your Zendesk Admin Center.
-
In the sidebar, under Apps and integrations > APIs, click Zendesk API.
-
On the Settings tab, enable the Token access option.
- Click Add API token.
- Enter a description for this API token, copy the generated token, and click Save.
Make sure to copy the API token, you need it to set up the Algolia connector in the Algolia dashboard and you won’t be able to see it again.
Set up the Algolia connector
- Sign in to the Algolia dashboard.
- On the left sidebar, select Data sources.
- On the Connectors page, select Zendesk Knowledge Base.
- Click Get started.
-
Fill the form with the following values:
- Account name: The name of your Zendesk account. For example, if your Zendesk URL is
https://my-zendesk-app.zendesk.com
, then the account name ismy-zendesk-app
. - email: The email address associated with the API token.
- API Token: The Zendesk API token you created in the previous step.
- Content to index: The Zendesk object you want to index. Choose between
articles
orposts
. Each connector can only index 1 type of content. If you want to index both objects, select one and create a new connector for the other. - Max Content Size: The connector will truncate the content to the specified size. The default value is 5,000 characters. To keep the size of your Algolia index small, you should keep the default value.
- Account name: The name of your Zendesk account. For example, if your Zendesk URL is
- Click Create source to continue.
Configure the Algolia index
- Configure the Algolia index as destination for your Zendesk content.
- Create the task for indexing the Zendesk content. You can define how often the content will be synced.
When the connector is created, you can directly trigger a crawl by clicking run task.
Update your theme
To replace the default search with Algolia Search, you need to update your help center theme. For more information, see Customizing your help center theme in the Zendesk documentation.
Replace the default Zendesk search with Algolia
- In your Zendesk Guide, on the sidebar, click Customize design.
- In the Themes section, select the theme you want to modify.
- From the list of templates, select the template
document_head.hbs
. -
Add the following code to the end of the
document_head.hbs
template:Copy1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/algoliasearch.zendesk-hc@2.32.0/dist/algoliasearch.zendesk-hc.min.css" > <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/algoliasearch.zendesk-hc@2.32.0/dist/algoliasearch.zendesk-hc.min.js" ></script> <script type="text/javascript"> algoliasearchZendeskHC({ applicationId: '<ALGOLIA-APPLICATION-ID>', apiKey: '<ALGOLIA-SEARCH-API-KEY>', subdomain: '<ZENDESK-SUBDOMAIN>', indexName: '<YOUR-ALGOLIA-INDEX-NAME>' }) </script>
Preview your changes
- Click Preview. For more information, see Previewing your changes in the Zendesk documentation.
- Enter a few letters in the search box. The autocomplete menu should show results from Algolia. If you just connected Algolia with your help center, the initial upload of your articles might take a moment.
If you want to change the look of your search, see Customize the CSS.
Next steps
After installing the Algolia for Zendesk integration and replacing the default search in your help center, you can change the configuration, you can customize the theme, or you can update the translations.