Documentation / Operations Agent
Operations agent: triggers
What can start a run (a finished PBX call, a webhook, a schedule, another agent, a manual run) and how to capture a real event with Listen.
Last updated:
A trigger is the first box on the board: it decides when the flow runs and what data it starts with. Each kind of trigger can appear once on a board, and a board can hold several kinds (for example a PBX call and a manual run). Triggers only start runs while the agent is enabled; a test run from the designer works either way.
Call ended (PBX)#
Every call the project's PBX journals starts the flow. The PBX is connected once for the whole project under Integrations (see Contacts and PBX integration). The trigger gives the steps:
caller_number,caller_name,callee_number,callee_name,direction(inbound, outbound, internal)duration_sec,status(answered, missed, and so on),subject,extension(the extension user's name)recording_url(the PBX download link) andrecording_ref(the recording's file name)call_id,contact_id,contact_number
A missed call has no recording. The steps that need one (download, transcribe, summarise, report) mark themselves Skipped: nothing to do and the run still completes, so a missed call never leaves a run waiting for retries.
Keep recording_url inside the flow: it carries the PBX's download secret. To identify a recording in another system send recording_ref instead.
One PBX call can start several agents: every enabled agent with this trigger runs on it.
Webhook received#
Anything that can post JSON can start the agent: the board shows the agent's own URL in the inspector (also under Settings). The request body becomes the trigger data, so a field order_id in the body is {{trigger.order_id}} in the steps.
Runs on a schedule#
Starts the flow every hour, every day at 09:00, on weekdays at 09:00, every Monday at 09:00, on the first of the month at 09:00, or on your own cron expression, in the timezone you choose, at most once every five minutes. Two choices:
- If the previous run is still going: skip this one, or queue it.
- Fires missed while the service was down: skip them, or run once.
After you save, the designer shows the estimated runs and cost per month, because every run bills at least 30 seconds of automation. The Overview shows the next scheduled run. The trigger gives scheduled_for, fired_at, cron, timezone and missed_by_s.
Called by another agent#
Another operations agent of the project hands data to this one, with Call another agent or the Dispatcher. The data it sent is the trigger data; caller_agent and caller_run_id say who called. Use it for agents that do one job for several others.
Manual run#
Starts the flow from the console or the API with data you type. Useful for boards you run on demand, such as transcribing one recording by its URL.
Listen for the real event#
The Webhook received, Call ended (PBX) and Called by another agent triggers have a Listen button in the inspector. Press it, then make the event happen: send the webhook from the other system, make and hang up a call on the PBX, or run the board that calls this one. The next event is shown in the inspector exactly as the trigger would receive it, formatted, and it is not run, even while the agent is disabled. Listening lasts ten minutes. Press Use as test payload to run the board with that exact data.
This is the quickest way to learn the real field names a system sends, instead of guessing them.