1. Connect
  2. Triggers
Rendering diagram…

Every run records what started it: Manual, Scheduled, Webhook or API.

​
By hand

In the UI, open the workflow, fill in the input form and choose Run. From the command line:

ava run process_invoice --input '{"text": "Invoice 42 ..."}'

​
Schedule

Add a cron expression to the workflow.

@ava.workflow(input=ReportInput, cron="0 6 * * 1")   # Mondays at 06:00
def weekly_report(): ...
Local operatorAvalanche Cloud
A new schedule startsOff. Turn it on with Run on schedule or ava schedule enable.On, at deploy
ClockThe machine’s local timeUTC
InputSaved when you turn the schedule onSaved when you turn the schedule on
ava schedule enable weekly_report --input '{"region": "eu"}'
ava schedule list

​
Webhook

webhook=True gives the workflow a URL. A POST with a JSON body starts a run, and the body is the run’s input.

@ava.workflow(input=TicketInput, webhook=True)
def triage(): ...
curl -X POST "$WEBHOOK_URL" -H "Content-Type: application/json" -d '{"ticket_id": 812}'
# 202 {"run_id": "run_..."}
Find the URLava webhooks list
Choose the pathwebhook=ava.Webhook(path="/tickets")
BodyA JSON object, up to 1 MiB
Answer202 and the run ID. The run continues in the background.

The local operator’s webhook listener accepts requests from the same machine only, and has no authentication.

​
API

The operator has a REST API. Starting a run is one request:

curl -X POST http://127.0.0.1:7435/api/v1/runs -H "Content-Type: application/json" \
  -d '{"workflow_selector": "flow.py::process_invoice", "input_json": "{\"text\": \"...\"}"}'