Support toolsAuto reply

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
  • Supports customizing behavior based on ticket tags and attributes

The webhook logic can be customized to your requirements. For example, you can:

  • Customize when to bypass the AI autoresponse based on ticket tags, user attributes, or other criteria
  • Add your own disclaimer language
  • Control the auto-reply flow and response behavior
  • Implement different handling for different types of tickets

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:

Deploy with 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
AUTO_RESPONDER_INKEEP_API_KEYYour Inkeep API key
ZENDESK_WEBHOOK_SECRETA secret key for the Zendesk webhook

Optional:

VariableDescription
AI_AGENT_USER_IDThe User ID you'd like the AI bot to have if leaving internal comments
ENABLE_PUBLIC_RESPONSESSet to true to make AI responses visible to customers (defaults to internal responses only)

2. Configure your local environment variables

Copy the .env.sample file to .env and configure the missing variables with the values you used in the previous step. These variables are used by the scripts you will run in the next step.

3. 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.

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

Debug Mode

By default, the AI Autoresponder runs in debug mode (internal notes only). In this mode, responses will only be visible to your support team as internal notes and not to the end-users.

To enable customer-facing responses:

  1. Set the environment variable: ENABLE_PUBLIC_RESPONSES=true
  2. Redeploy the application

When ENABLE_PUBLIC_RESPONSES is not set or is set to any value other than "true", the AI Auto Responder will only create internal notes (not visible to end-users) when responding to tickets.

On this page