# Apply a macro to similar tickets

> Find Zendesk tickets about the same issue, preview what a macro will change on them, and apply it to each one after your approval.

When many tickets are about the same thing, find them all and apply the right macro, checking what it does first.

## What you'll get

- The open tickets that match the issue you describe.
- The macro that fits, and a preview of exactly what it will change: reply text, status, tags and other fields.
- After your yes: the macro applied to each ticket, with a list of what changed.

## What you need

- [Zendesk](https://docs.plugsight.app/connectors/zendesk.md) connected with an agent or admin login, and a macro that already exists in Zendesk.
- To apply macros, all of these:
  - The **Pro** or **Agency** plan.
  - The Zendesk connection's switch set to **Can reply & update**.
  - **Allow changes** ticked on the MCP server.
  - Helpdesk changes not paused on **Permissions**.

## Ask this

```text
Using Plugsight, find open Zendesk tickets from the last 7 days about the delivery delay to Scotland. List them. Then find our macro for shipping delays, preview what it would change on the first ticket, and wait for my yes before applying it to each of them.
```

## Variations

- **By tag:** "Apply the 'Refund approved' macro to open tickets tagged refund-ok."
- **Find a macro:** "Which macros do we have about passwords?"
- **One ticket:** "Apply the 'Close and thank' macro to ticket 4821."
- **Check first:** "Preview the macro on every ticket before you apply any."

## What your AI does behind the scenes

1. Searches for matching tickets (`zendesk_search_tickets`), with words, tags or dates.
2. Finds the macro by words in its title (`zendesk_list_macros`).
3. Previews the macro on a ticket (`zendesk_apply_macro` with preview on), which changes nothing, and shows you the result.
4. After your yes, applies it to each ticket (`zendesk_apply_macro` with your approval).

A macro can work out differently on different tickets, for example if it inserts the customer's name. Ask for a preview on each ticket if that matters.

## Does it change anything?

Yes, after your approval. If the macro includes a public reply, Zendesk emails it to the customer. Plugsight refuses to apply a macro your AI hasn't marked as approved, and each change is recorded in **Activity**. See [Approvals in your AI app](https://docs.plugsight.app/ai-apps/approvals.md).

## Related articles

- [Draft a ticket reply and add an internal note](https://docs.plugsight.app/recipes/zendesk-reply-and-note.md)
- [This week's Zendesk themes](https://docs.plugsight.app/recipes/zendesk-weekly-themes.md)

---

Web version: https://docs.plugsight.app/recipes/zendesk-apply-macro
