You can use InfraNodus in combination with n8n automation tool to build an embeddable AI chat that will allow your users to interact with the knowledge in your Zendesk support portal. You can then expose this AI chatbot via our customizable n8n Chat Widget using the embed code or a URL.
We use this setup for the AI chatbot implementation we have on this support portal and are very satisfied with the results. You can compare it with the native Zendesk AI chatbot available at https://infranodus.com (this custom setup is available at https://support.noduslabs.com or at the bottom right popup widget on this very page).
You will see that our custom version provides more extended and nuanced responses. This is thanks to the underlying ontology provided via the InfraNodus GraphRAG node. Another advantage is that you can switch between different models, add additional sources, and the whole setup is also cheaper because the native Zendesk AI chat widget requires their Chat module connected that costs additional $25 per agent.
Below is the schema of the workflow that we use, it is available at https://n8n.partnerlinks.io/infranodus
When you complete your setup, you will have a custom AI chatbot on your Zendesk support portal available as a popup or inline embed and it will look something like this:
Here is a short video that explains how to build something like this with InfraNodus and n8n and you can read the full instructions below.
Quick Guide: Setting Up Your Custom Zendesk AI Chatbot
Here's a step-by-step guide to setting up your custom Zendesk AI chatbot that you can embed directly on your Zendesk knowledge portal and / or on any other website. The whole process should take you about 20 minutes.
-
Create a new API token to access your Zendesk knowledge base. This can be found in your Zendesk Admin Center > Apps & Integration > API Tokens. Usually it would be located at
https://<your-portal-name>.zendesk.com/admin/apps-integrations/apis/api-tokens - Create an account at n8n automation tool and download the InfraNodus workflow for Zendesk AI Chat from the official n8n workflows directory (it will be a JSON file).
You can also download the workflow JSON directly from our official GitHub repository here:
https://github.com/infranodus/n8n-infranodus-workflow-templates/blob/main/customer-support-email/zendesk-ai-chatbot-agent.json - Then log in your n8n cloud or a local n8n instance, click "Create Workflow", and, once created, go to the ... menu and click "Import from file" to import the JSON file with the workflow
- Once imported, you need to change some parameters to make it work with your Zendesk version
- Go to the Zendesk Node (5) and add your Zendesk API credentials in the node's setting
- Go to the InfraNodus expert ontology node (5) and add
- your InfraNodus API credentials — can be obtained at https://infranodus.com/api-access
-
the name of the ontology graph in InfraNodus you're going to query to augment the user's prompt and Zendesk's responses. Learn how to build this graph manually or automatically on our n8n ontology creator support page. On a very basic level this graph will contain statements like
[[infranodus]] can be used to improve [[zendesk]] responses in [[n8n]]
- Go to the AI Support Agent Node (2) and modify the prompt to be more suitable to your content. Do not change its structure or rules, just modify some aspects of the prompt to be more suitable for the knowledge found in your portal.
- Connect the OpenAI Node (3) to your own API key or select another model node (e.g. Grok)
- Copy the url from the Webhook Node (1) Test URL field and save the workflow.
- Then click "Execute Workflow"
- After finishing all the steps in section 4 above, go to n8n chat widget site and paste the URL you copied from the webhook node on the front page and then click "Update Widget" — a popup widget will appear that will communicate directly with your workflow. Ask any question and watch the workflow executed on n8n. You can also see the logs after. If anything is wrong, it is usually because of the authorization (API) access, so you need to fix this.
- If everything works well, go back to your n8n workflow and switch the toggle at the top to "Active". Then go to Webhook and copy the Production URL (not the Test URL). Make sure to save the workflow.
- Go back to the n8n chat widget site and paste the production URL into the widget's webhook field. Click "Update Widget", then open it, and try again.
- If everything works well, you can take the code generated by the n8n chat widget website and paste it to your Zendesk support portal.
You can also create an account on the create an account on n8n chat widget website and customize your widget, define the sites it can be used at (to avoid unauthorized use), and track user queries (can be useful to understand what people are searching for and to use the data in training custom models later). You can also choose whether you want your widget to work as popup or to be embedded on a page of your support portal. See an example on the front page of this support portal: https://support.noduslabs.com -
To paste the widget to Zendesk, take the embed code, then go to your Zendesk Knowledge Base > Admin > Themes. Then click Edit Theme > Customize > Edit Files. Then you can edit the file where you want the widget to be embedded.
For instance, in our case we actually have two instances of the widget, so
We first we add the actual widget script to theheader.hbsfile so it is accessible from every page:<script src="https://n8n-chat-widget.com/widget.min.js"></script>Then we add the popup widget code to the
footer.hbsfile so it appears on every page of the Zendesk portal:<script> new N8NWidget({ apiKey: 'your_api_key' // Add manual configuration to override server config }); </script>Then we add the inline widget to the
home_page.hbspage so it appears at the bottom of the front home page of the support portal:<section class="section home-section activity n8n-chat-widget"> <!-- N8N Chat Widget (Managed - Inline) --> <div id="n8n-chat-widget-container" style="height: 600px;"></div> <script> new N8NWidget({ apiKey: 'your_api_key', mode: 'embed', targetElement: '#n8n-chat-widget-container' }); </script> </section>The interesting part here is that we add two different widgets — one embedded inline at the bottom of support.noduslabs.com and another one as a popup button on every page of the portal.
- Once you've done all these steps, congratulate yourself, you created your own Zendesk support portal AI chatbot and it actually works much better than the native Zendesk one. You can also customize it to any extent, use additional data sources, connect different models, etc.
How Does InfraNodus Ontology AI Advice Work?
In this setup, we use the AI Agent node in n8n with a custom prompt to orchestrate retrieval between the Zendesk support portal and InfraNodus knowledge graph.
The InfraNodus GraphRAG node provides the reasoning ontology to the model that helps it understand the main features of your product. InfraNodus GraphRAG node is used to augment the search query with contextual information about the results that can be found in the knowledge base, so that the results retrieved are more relevant to the user's intent.
The underlying ontology provides an explicit set of relations between the entities and functions present within InfraNodus and help LLM (and AI agent node) have a better overview of the context:
This ontology is used to:
- Augment user's prompt
- Give the model a better awareness of the context and the content of the knowledge base
- Create a search query to retrieve the most relevant articles from the Zendesk portal
- Synthesize the results into the final response
Here's the example of the graph we use for this support portal (based on InfraNodus' functionalities):
https://infranodus.com/expert/infranodus_support
We highly recommend that you build the ontology graph for your support portal automatically or manually using the instructions on this page:
Building Expert Ontology for InfraNodus GraphRAG n8n Expert Node
This will only take you a couple of hours at max, but you will have a very clear thinking scaffolding for your model that you can reuse in other LLM applications: for instance, for developing your product, producing marketing materials, and automations within your software tools.
Comments
0 comments
Please sign in to leave a comment.