Draft Zendesk replies from your Elasticsearch ticket history

When a new Zendesk ticket lands, search your Elasticsearch index of past resolved tickets and help articles, then leave a cited draft reply as an internal note for the agent.

Agentic Task
ZendeskElasticsearchCustomer SupportFeedback TriageContent GenerationNotifications & Alerts

Build an agent workflow that drafts a suggested first reply on every new Zendesk ticket by searching our Elasticsearch index of past resolved tickets and help center articles, and leaves the draft as an internal note so a human agent still owns the response.

Trigger: incoming webhook from Zendesk. A Zendesk admin will configure an outgoing trigger in Zendesk Admin Center under Apps and integrations, Webhooks and Triggers, that fires on 'Ticket Created' and POSTs the ticket id (and ideally subject, description, requester id, tags, brand id, and ticket form id) to the workflow's webhook URL as JSON. The agent should accept this payload as input.

Step 1. Read the new ticket. Use Zendesk Show Ticket with the ticket id from the webhook payload to fetch the full ticket. Pull out the subject and the first comment (the original customer message). If the comment is HTML, strip it down to plain text for searching. Also keep the ticket id handy for posting the internal note later.

Step 2. Search Elasticsearch for similar past tickets and KB articles. Use Elasticsearch Search Documents (Query Index) against the configured index (I will tell the agent the index name and the field mapping during setup). Combine the subject and the body as the query text. Prefer a hybrid query: a multi_match keyword query across the title/body fields, combined with a kNN or semantic query if the index has a dense_vector or sparse_vector / ELSER field configured. Filter to records flagged as resolved or as published KB articles. Return the top 5 hits with their title, snippet, source link, and any resolution summary field. Use a tight _source list so we only get the fields the agent needs.

Step 3. Judge relevance. Read the top 5 hits and decide which ones are genuinely about the same issue the customer is reporting, not just keyword overlap. If fewer than one or two hits look truly relevant, or if the relevance scores are weak and the content does not match the customer's problem, stop the workflow without posting anything. The whole point is to skip silently when there is no real match, so agents are not trained to ignore noisy suggestions.

Step 4. Draft a suggested reply. Write a short, agent-voice draft that: greets the customer briefly, acknowledges the issue in their words, walks through the resolution steps drawn from the matched past tickets and KB articles, and links the KB articles by URL so the human agent can paste them through. Keep it under roughly 200 words. At the bottom of the draft, list the sources you used as a short 'Suggested sources' block with the title and link of each cited past ticket or article so the agent can quickly verify.

Step 5. Post as an internal note. Use Zendesk Update Ticket on the same ticket id, adding a comment with public set to false so it is an internal note, not a public reply. The note body should start with a one-line header like 'Geni suggested reply (draft, not sent)' so agents instantly recognize it, followed by the drafted reply, followed by the suggested sources block. Do not change the ticket status, priority, assignee, or tags. The human agent stays in control of the actual response.

Guardrails: never post a public reply, only internal notes. Never include made-up steps or links that did not come from the Elasticsearch hits. If the search returns zero hits or only weak matches, do nothing. If the ticket already has an internal note from this workflow (check List Ticket Comments for our header string), skip so we never double-post on retries.

Additional information

What does this prompt do?
  • Watches Zendesk for new tickets and instantly pulls the full subject and customer message.
  • Searches your Elasticsearch index of resolved tickets and help center articles for the closest past matches.
  • Drafts a suggested reply that quotes the prior resolutions and links the supporting articles, then drops it on the ticket as an internal note for the human agent.
  • Stays quiet when nothing in the index is actually relevant, so your agents are not nudged with noise.
What do I need to use this?
  • A Zendesk account where an admin can set up an outgoing trigger that fires when a ticket is created.
  • An Elasticsearch cluster with an index of your past resolved tickets and help center articles, reachable from General Input.
  • A few minutes to tell the workflow which Elasticsearch index to search and which fields hold the title, body, and link for each record.
How can I customize it?
  • Change how many past matches the agent considers, from a tight top three to a wider top five or ten.
  • Tighten or loosen the relevance bar so the draft only appears when matches are genuinely close, or whenever something half-related shows up.
  • Adjust the tone and structure of the suggested reply to match your brand voice, including which links and quotes to include.

Frequently asked questions

Will customers see the draft reply directly?
No. The draft is posted as an internal note on the ticket, visible only to your agents. A human still owns whether to send it, edit it, or ignore it.
What if nothing in our index is a good match?
The workflow stays silent. It only posts a draft when the past tickets or articles it finds are genuinely relevant, so your agents are not trained to ignore noisy suggestions.
Does this need a special Elasticsearch setup?
Any Elasticsearch index with searchable text fields works. If your index also supports semantic or vector search, the workflow can take advantage of that for stronger matches on phrasing the customer used.
How do new tickets get into the workflow?
A Zendesk admin sets up an outgoing trigger in Zendesk that fires whenever a ticket is created and sends it to the workflow. From then on, every new ticket flows through automatically.
Can I limit this to certain ticket types or brands?
Yes. You can filter inside the Zendesk trigger itself, or tell the workflow to skip tickets that match certain tags, forms, brands, or groups.

Stop making agents hunt for the same answer twice.

Connect Zendesk and Elasticsearch once, and Geni leaves a cited draft reply on every new ticket the moment it opens.