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:

  1. A Zendesk account with admin access
  2. Get an Inkeep API key
  3. 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:

VariableDescription
ZENDESK_SUBDOMAINYour Zendesk subdomain (e.g., if your Zendesk URL is mycompany.zendesk.com, enter ‘mycompany’)
ZENDESK_API_TOKENYour Zendesk API token (generate from Zendesk Admin settings)
ZENDESK_API_USEREmail address of the Zendesk user that generated the API token
INKEEP_API_KEYYour 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.

  1. Navigate to the webhook_setup folder in your local terminal (cd webhook_setup).
  2. Enable execution of the setup script by running chmod +x setup.sh.
  3. 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:

  1. Create a ticket:

    • Go to your Zendesk workspace
    • Create and submit a ticket with a test message
  2. 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