Apply macro

Apply a macro to one ticket and save the result.

MCP tool zendesk_write → apply_macro

write Confirm

Applies the macro's actions to the ticket: it can set fields, add tags and insert a comment, then saves the ticket. The response lists what changed. A macro that adds a public comment emails the requester. If the macro changes a field that is not on the ticket form, or your user lacks permission for the change, that action does not happen. If the ticket changed in the meantime, the call fails and asks you to read the ticket again. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: apply_macro
NameTypeDescription
ticket_id integer required integer Ticket ID from search_tickets or list_view_tickets.
macro_id integer required integer Macro ID from list_macros.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "zendesk_write",
    "arguments": {
      "operation": "apply_macro",
      "arguments": {
        "ticket_id": 48177,
        "macro_id": 360011204873
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "ticket_id": 48177,
    "macro": {
      "macro_id": 360011204873,
      "title": "Downgrade and inform"
    },
    "changes": {
      "priority": "low"
    },
    "comment": {
      "public": true,
      "body": "Thanks for the idea. We have lowered the priority of your request to low, so it may take longer to get to."
    },
    "updated_at": "2026-10-16T09:03:00Z"
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.