Build a routine
A routine is a flow of steps that runs in the background when a conversation ends, on a schedule, or when another system sends a webhook. To build one, choose a trigger, connect steps after it, and set what each step reads and where the run goes next.
Routines are in beta and not yet available in every workspace. To request access, contact your account manager.
Create a routine
Create the routine
Open Routines in the ElevenAgents sidebar and select New routine. New routines start with a Manual run trigger.

Choose the trigger
Select the trigger to change its type, or keep Manual run while you build. See Triggers.
The editor saves the draft as you work. Only test runs use the draft until you publish it.
You can also build a routine with Architect. Describe what it should do, and Architect writes the steps into the draft, runs tests, and publishes it with you. It asks for your approval before actions like placing real calls or publishing.
Pass data between steps
Each step lists the inputs it needs under Inputs. Set each one to a fixed value, or pick a field from the trigger, an earlier step, or a variable. For example, an HTTP request step named lookup_customer can take customer_id from the trigger, and a later step can read lookup_customer.body.tier from its response.

Variables
Variables are named values that any step later in the run can read, such as a customer ID that several steps need. Add them in the routine’s Variables panel, with a type (string, number, or boolean) and a default. To fill a variable, select the {} button next to any trigger field or step output, then name a new variable or pick one the routine already has.

Branch with conditions
A connection between two steps can carry a condition. After a step finishes, the run follows every connection whose condition holds, so two matching branches run in parallel.

A branch with no matching connection ends there, and the run still succeeds. A step that several branches lead to runs once, after all of the branches that reach it have finished.
Two cases fail a run where branches meet: both branches set the same variable, or the step reads an output from a branch the run didn’t take.
Handle failures
A step fails when its retries run out, when it gets an error that isn’t retried (such as an HTTP 4xx response), or when one of its inputs can’t be resolved. By default, a failed step fails the whole run.
Add an error connection from a step to run cleanup when it fails, such as posting an alert. Steps on an error path can read the failure as error:
A run whose step failed still ends as failed, even when an error connection handles it. Use error connections to notify or clean up, not to recover.
Each step’s Retry settings control how many attempts it makes, with exponential backoff between them. Outbound call steps never retry, so a retry can’t dial the same number twice.
