Skip to content

Starting automations

An event can start an automation instead of a single agent. That lets one event run several steps: check a condition, ask two agents side by side, wait for your approval, then summarise.

1. Set the automation to start from events

Section titled “1. Set the automation to start from events”
  1. Open Automations and create or open an automation.
  2. Under What starts it, choose An incoming event.
  3. Optionally paste a sample event (like {"title": "Car arriving", "data": {"plate": "ABC123"}}), so Try live has something to work with.
  4. Write the steps. Use {{trigger}} wherever a step needs the event.
  5. Press Save & enable. A paused automation refuses events.

Name the automation in workflow:

Terminal window
curl -X POST http://127.0.0.1:47800/api/events \
-H "Authorization: Bearer hive_…" \
-H "Content-Type: application/json" \
-d '{"workflow": "Car arrives", "title": "Car arriving",
"data": {"plate": "ABC123", "camera": "driveway"}}'

Send workflow or agent and prompt, not both.

The event’s title, message and data are passed to the first step as {{trigger}}, inside <event> tags. Steps are told to treat it as information, not instructions.

For example, a step might say:

A camera saw a car: {{trigger}}
ABC123 is Sarah and XYZ789 is the plumber. Say who it is in one sentence.

As with any automation, the result is posted to Activity unless you untick Post the result to Activity, and each run is kept in its Run history.

error Fix
There's no workflow called '…'. Check the name matches the automation exactly.
That workflow doesn't start from events. Set its trigger to an incoming event. Change What starts it to An incoming event.
That workflow is paused. Press Save & enable or Resume.