Skip to navigation

Triggers

Start routine runs manually, on a schedule, from a webhook, or when a conversation ends.

Every routine has one trigger. The trigger starts each run and provides the run’s input. A trigger only fires while the routine is enabled, and it always runs the published version.

Routines are in beta and not yet available in every workspace. To request access, contact your account manager.

Once a routine is published, Run now in the editor header starts a run of the published version with any trigger, using input you fill in.

Manual run

A manual run trigger never starts a run on its own. Define the run’s input fields on the trigger, and Run now asks for their values.

Run now dialog asking for a manual run trigger's input
fields

Schedule

A schedule trigger runs the routine on a repeating schedule, in the time zone you choose: hourly, daily, on weekdays, weekly, or monthly at a time you set, or on a Custom (cron) expression for anything else. The trigger shows the next run times as you edit.

Schedule trigger set to run weekly on Monday at 09:00 London
time

Each run’s input is the time it was scheduled for:

{
"scheduled_time": "2026-12-08T09:00:00+00:00"
}

Incoming webhook

An incoming webhook trigger lets another system, such as your CRM or helpdesk, start a run by sending a request with its own data.

1

Generate the secret

In the trigger’s settings, select Generate secret.
2

Configure the sender

Copy the webhook URL shown on the trigger, and the secret, into the system that sends requests.

3

Capture a sample (optional)

With the routine turned off, select Listen for a sample request and send a request. The editor fills in the trigger’s input fields from its body. A request sent while the editor is listening is captured instead of starting a run.

Incoming webhook trigger with its webhook URL, secret, and input
parameters

Send the secret in the X-Webhook-Secret header and the run’s input as a JSON body. Routines have no SDK support yet, so call the webhook URL directly:

import os
import requests
from dotenv import load_dotenv
load_dotenv()
response = requests.post(
"https://api.elevenlabs.io/v1/convai/routines/routine_6801m6ngj6hafeftf8shk12jzfzd/webhook",
headers={"X-Webhook-Secret": os.getenv("ROUTINE_WEBHOOK_SECRET")},
json={"customer_id": "cus_8Hk2pQ", "appointment_time": "2026-12-03T15:00:00Z"},
)
response.raise_for_status()
print(response.json()["routine_run_id"])

The body must be a JSON object of at most 256 KB, and it becomes the run’s input. The endpoint responds with one of these statuses:

StatusMeaning
202The run started. The response has routine_run_id.
400The body isn’t a JSON object, or a required input field is missing. No run starts, and the error names the field.
401The secret is missing or wrong.
403The routine can’t run as the member who published it.
409The routine isn’t turned on with this trigger.
413The body is larger than 256 KB.
429Too many requests: over the routine’s 60 a minute, or the workspace’s 1,000 runs an hour.

Anyone with the secret can start runs with any input, including values your steps use, such as a number to call. If it leaks, regenerate it from the trigger. Regenerating replaces the value in place, so update your sender at the same time.

Conversation ended

A conversation ended trigger starts a run when a conversation with one of the selected agents ends, once its analysis has finished. The run’s input is the conversation, with its data collection and success evaluation results:

{
"conversation_id": "conv_0501k6qxbw7fe6v9z3h0r2m8ct4d",
"agent_id": "agent_7101k5zvyjhmfg983brhmhkd98n6",
"agent_name": "Support agent",
"status": "done",
"metadata": {
"start_time_unix_secs": 1764836400,
"call_duration_secs": 184
},
"analysis": {
"call_successful": "success",
"transcript_summary": "The customer asked to move their delivery to Friday. The agent confirmed the new date.",
"call_summary_title": "Delivery moved to Friday",
"evaluation_criteria_results": {
"resolved": {
"criteria_id": "resolved",
"result": "success",
"rationale": "The agent changed the delivery date as requested."
}
},
"data_collection_results": {
"email": {
"data_collection_id": "email",
"value": "jane.doe@example.com",
"rationale": "The customer gave their email address to receive the confirmation."
}
}
},
"transcript": [
{ "role": "agent", "message": "Hi, how can I help you today?", "time_in_call_secs": 0 },
{ "role": "user", "message": "I'd like to move my delivery to Friday.", "time_in_call_secs": 4 }
]
}

For example, to send a follow-up email, set the step’s recipient to the trigger’s analysis.data_collection_results.email.value.

Conversation ended trigger with an agent selected and conversation fields saved to
variables

When a trigger doesn’t start a run

  • The routine is turned off, or hasn’t been published.
  • The workspace is over its 1,000 runs an hour. A scheduled run is recorded as Stopped, and a webhook request gets a 429.
  • A schedule’s previous run is still going, or its time was missed by more than a minute.
  • A webhook request arrives while the editor is listening for a sample.
  • The conversation is encrypted or in Zero Retention Mode, or it already started this routine.
  • The member who published the routine lost access to something it uses. The routine is also turned off.