Skip to main content
This recipe builds an agent that runs when a Zendesk ticket is created, reads it, and adds a draft reply as an internal note. The requester never sees the note; a support agent edits it and sends it. It uses a Native agent: you write a prompt and a tool list, no code.

Before you start

  • The Guild CLI, logged in.
  • Zendesk connected in your workspace by a Zendesk admin. Guild creates a webhook in your Zendesk account when the trigger is enabled, and only admins can manage webhooks. See Zendesk setup.

1. Create the agent

Replace PROMPT.md with the agent’s instructions:
Replace guild.yaml with the tools the prompt uses:
public: false makes the comment an internal note. The agent answers from your workspace context, so add your help articles and policies there.

2. Save it and install it in your workspace

3. Create the trigger

The trigger fires for every new ticket on the Zendesk connection; Zendesk triggers have no service_config to narrow them. The agent receives a prompt that names the event and action, followed by the ticket as JSON. Guild trims it to fields such as the ID, subject, description, status, priority, tags and requester ID. --action created matters. The agent’s note fires a comment_added event, and Guild doesn’t filter out the agent’s own changes, so a trigger with no action would run the agent again on its own note.

4. Try it

Create a ticket in Zendesk. The draft appears on it as an internal note from the connected Zendesk user. To see what the agent did, run guild trigger sessions <trigger-id> and open the session URL. Find the trigger ID with guild trigger list. Events for the same ticket share one session, across every trigger and agent in the workspace.

Variations

  • Tag what it drafted. Add "tags": ["guild-draft"] to the ticket object, so a Zendesk view can list the tickets waiting for review. tags replaces the ticket’s tags, so tell the agent to include ticket.tags too.
  • Draft for some tickets only. Tell the agent to stop without writing when the ticket doesn’t match, for example when ticket.tags doesn’t include billing.
  • Answer follow-ups. Add a trigger with --action comment_added. The event includes the comment and its author, so tell the agent to stop when comment.author.is_staff is true; otherwise its own notes and your team’s replies trigger it.
Last modified on October 15, 2026