How to Set Up a Custom Webhook Trigger for Your AI Agent
Most of the time, Macha's built-in triggers (a new Zendesk ticket, a status change) are all you need. But sometimes you want finer control over when an agent fires — based on conditions only your helpdesk knows — or you want to fire an agent from a system that isn't a built-in connector. That's what custom webhook triggers are for. There are two flavors, and both are straightforward.
Watch it
Flavor 1 — a custom Zendesk webhook (for fine control)
Say you've built an auto-classifier agent that should re-classify a ticket on every new customer message — and you want to control exactly which tickets reach it using Zendesk's own conditions. Here's the flow:
- On the agent, go to Triggers → Add Trigger, scroll down, and select Custom Webhook.
- Read the instruction it shows you. This is the key bit: Macha has already created the webhook on your Zendesk instance for you. All you have to do is create a Zendesk trigger that fires it.
- Go to Zendesk → Admin → Triggers and create a Zendesk trigger. Set whatever conditions you want (the tickets it should match), and add the action to fire the webhook Macha created.
Now Zendesk's trigger conditions decide which tickets hit your agent — giving you precise, helpdesk-native control that the built-in triggers don't expose. (This pairs closely with stopping infinite loops, since you control the conditions.)
Flavor 2 — a universal webhook (for any system)
What about a system that isn't one of Macha's connectors at all? Use the Macha Custom Webhook trigger:
- On the agent, go to Triggers, remove any event trigger you don't want, and add the Macha Custom Webhook trigger (scroll to the bottom of the list).
- Toggle it on, and Macha gives you a webhook URL — copy it.
- Point your external system at that URL. Whenever your system fires an event to it, the agent is listening and starts working, with the event's data as context.
That's the universal escape hatch: any tool that can send an HTTP request — Zapier, Make, a custom backend — can now start your agent.
Which flavor do you need?
| Situation | Use |
|---|---|
| You want Zendesk-native control over which tickets fire the agent | Custom Zendesk webhook (Zendesk trigger → Macha's webhook) |
| You want to fire the agent from a non-connector system | Macha Custom Webhook (copy the URL, point your system at it) |
A note on cost and loops
Because a custom webhook can fire often (every customer message, every external event), it's exactly the kind of trigger that can overfire or even loop. Two guardrails:
- Scope the conditions tightly (in Zendesk or your system) so only the right events reach the agent — this also keeps credit usage down.
- Prevent loops when an agent's own action could re-fire the trigger — the standard fix is to tag processed tickets and exclude tagged tickets in the trigger conditions. Full detail in how to stop an agent from infinitely looping.
Frequently asked questions
What's a custom webhook trigger? A trigger fired by a webhook — either a Zendesk trigger you configure (for fine control) or any external system pointing at a Macha webhook URL.
Do I have to create the webhook in Zendesk myself? No — Macha creates the webhook on your Zendesk instance automatically. You just create a Zendesk trigger that fires it.
How do I fire an agent from a non-connector app? Add the Macha Custom Webhook trigger, copy the URL it gives you, and point your system at it.
Why use a custom webhook instead of a built-in trigger? For finer control over which events fire the agent (via Zendesk conditions), or to trigger from systems Macha doesn't have a connector for.
Can this cause loops? It can if the agent's action re-fires the trigger — scope conditions tightly and tag processed tickets to prevent it.
The bottom line
Custom webhook triggers give you control the built-in triggers don't: a Zendesk webhook (Macha makes it; you point a Zendesk trigger at it) for fine-grained, condition-based firing, or a universal Macha webhook URL for any external system. Scope them carefully, guard against loops, and you can fire an agent from almost anything.
Wire up a custom trigger: fire your agent exactly when you want. 7-day free trial, no credit card required. Start free.