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

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:

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
INKEEP_API_KEYYour Inkeep API key
AI_AGENT_USER_ID(Optional) (Recommended) 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
INTERNAL_ONLY(Optional) (Recommended) true or false. If true, the AI will only add internal notes and not send a public response.

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.

  1. In Zendesk Admin Center, go to Apps and Integrations > Webhooks
  2. Create a new webhook with the following settings:
    • Name: Inkeep Smart Replies
    • Endpoint URL: Your deployed Vercel URL + /api/webhook (e.g., https://your-app.vercel.app/api/webhook)
    • Request method: POST
    • Request format: JSON
    • Basic authentication: No
    • Active: Yes
  3. Create a trigger to invoke the webhook:
    • Go to Admin Center > Objects and rules > Business rules > Triggers
    • Click Add trigger
    • Name it Inkeep Smart Reply Trigger
    • Set conditions:
    • Ticket: Is Created
    • Set actions:
    • Notify webhook: Select the webhook you created

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

Review the Zendesk webhook activity:

  • In Zendesk Admin Center, go to Apps and Integrations > Webhooks
  • Click on your Inkeep Smart Replies webhook
  • Check the Activity tab to confirm the webhook fired for your test ticket
  • Verify the webhook shows a successful (200) response

Check the Vercel logs:

  • Go to your Vercel dashboard
  • Select your deployed application
  • Navigate to Deployments > Latest Deployment > View Functions Logs
  • Look for logs showing the webhook request was received and processed

Check that your Zendesk Workspace is configured to send emails on public replies to tickets:

  • Look at the Zendesk email tigger guide here.

If your auto-responder is timing out:

  • The default maxDuration on Vercel free plan is 60 seconds. This is the maximum time the AI can take to generate a response. You can increase this by setting the maxDuration parameter on the route.ts file and upgrading to a paid Vercel plan.

Double-check the environment variables are configured correctly

On this page