Auto-reply to support tickets with Inkeep AI
Overview
This guide provides instructions for how to setup an AI auto-reply with Zendesk. The template repo can be adapted to work with any support platform.
By default, the auto-responder implementation:
- Provides an AI generated answer if it is
very_confident
- Leaves an internal note if it is not confident
The webhook logic can be customized to your requirements. For example, you can customize when to bypass the AI autoresponse based on ticket or user attributes, add your own disclaimer language, and in general control the auto-reply flow.
Prerequisites
Ensure you have:
- A Zendesk account with admin access
- Get an Inkeep API key
- Access to deploy an API route (e.g., using Vercel Serverless Functions)
1. Deploy the webhook
The fastest way to get started is to deploy the serverless API route to Vercel:
Simply configure these environment variables:
Variable | Description |
---|---|
ZENDESK_SUBDOMAIN | Your Zendesk subdomain (e.g., if your Zendesk URL is mycompany.zendesk.com, enter ‘mycompany’) |
ZENDESK_API_TOKEN | Your Zendesk API token (generate from Zendesk Admin settings) |
ZENDESK_API_USER | Email address of the Zendesk user that generated the API token |
INKEEP_API_KEY | Your Inkeep API key |
AI_AGENT_USER_ID | (Optional) Numeric ID of the user you want to send messages as. Recommended to use an email address that you own and has the name “AI Agent” or similar |
2. Configure Zendesk
Now, let’s configure Zendesk to send a webhook to your API route when new tickets are created.
Option A: Automated (Recommended)
- Navigate to the webhook_setup folder in your local terminal (
cd webhook_setup
). - Enable execution of the setup script by running
chmod +x setup.sh
. - Execute it with
./setup.sh
. This will create the webhook and trigger for you.
The script will write the created webhook and trigger IDs to a file named .webhook_resources
. You can use these IDs later to clean up the resources by running the cleanup script: chmod +x cleanup.sh
and ./cleanup.sh
.
3. Environment Configuration
Copy the .env.sample
file to .env
and configure the missing variables.
4. Test the Setup
To verify everything is working correctly:
-
Create a ticket:
- Go to your Zendesk workspace
- Create and submit a ticket with a test message
-
Verify answer:
- Check that an AI-generated response was added as a reply or internal note
- The note should be from the user specified in your
AI_AGENT_USER_ID