Skip to documentation

Automations

Automations

Build workflows that start when your app sends a custom event.

How it works

An automation starts a run for one contact each time your app sends its trigger event. The run follows the steps you connect: send emails, wait, branch on conditions, wait for another event, and change the contact. Every team member can create, edit, start, and stop automations.

Create one in the dashboard

  1. Open Automations and click Create automation. A blank automation named Untitled automation opens in the builder. Rename it in the top bar.
  2. In the Custom event card, type or pick the event that starts a run, for example user.created. A new name is created as an event definition. See trigger.
  3. Click a + button between cards to add a step. The menu groups them as Messages (Send email), Flow control (Condition, Delay, Wait for event), and Audience (Update contact, Delete contact, Add to segment).
  4. Click a card to configure it. A Condition splits the path into True and False; a Wait for event splits it into Event received and the timeout. Nothing can follow a branching step directly: new steps go on one of its paths.
  5. Click Start.

The builder saves each change automatically; there is no Save button. To remove a step, choose Remove from its card's menu. Removing a branching step removes the steps on both of its paths.

If something is missing, Start opens Tasks remaining to start automation with a list per card, such as Set event, Add a step, Select an email template, Publish the email template, or Select a segment. Cards with open tasks have an amber border.

Start, stop, and edit

  • Start enables the automation. Only events sent after that moment start runs.
  • Stop disables it. No new runs start, and runs already in progress finish.
  • While an automation is enabled, its steps are locked. Stop it to edit, then start it again. Renaming works at any time.
  • Each run keeps a snapshot of the steps and the trigger payload from when it started, so editing never changes runs already in progress.

From the Automations list, each row's menu has Open automation, Rename automation, Duplicate automation (a disabled copy named <name> copy), Enable automation or Disable automation, and Delete automation. Deleting stops runs in progress and removes the run history; an email already queued cannot be recalled.

Use Test event from the builder's menu to send the trigger for one contact with a sample payload; the automation must be started first. See runs to follow what happened.

Use the API

The automations API needs a full-access key. It describes the same workflow as a flat list of steps and connections:

bash
curl "$OPENSEND_BASE_URL/automations" \
  -H "Authorization: Bearer $OPENSEND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"name":"Welcome","steps":[{"key":"start","type":"trigger","config":{"event_name":"user.created"}},{"key":"pause","type":"delay","config":{"duration":"1 hour"}}],"connections":[{"from":"start","to":"pause"}]}'

The response is 201 with object: "automation" and an ID. New automations are disabled; update the status to enabled when they are ready.

Step types are trigger, send_email, delay, wait_for_event, condition, contact_update, contact_delete, and add_to_segment. Connections are default, or condition_met and condition_not_met after a condition, or event_received and timeout after a wait. Triggers use event_name; sends use template: {id, variables?}; delays use a human-readable duration; waits use event_name and a human-readable timeout. Variables can be plain values or references such as {"var": "event.plan"}.

Limits

  • One trigger plus at most 100 steps, a 64 KiB definition, and 12 levels of branching.
  • Paths cannot rejoin, loop, or fan out; each step has one path in.
  • Delays and wait timeouts can be at most 30 days.
  • Not supported: nested groups mixing and and or, comparisons with null, subject overrides on a send, structured template variables, and filters on a wait.
  • Through the API, edit steps only while the automation is disabled, and send steps and connections together.

Use send event to trigger enabled automations, stop to disable one, and list runs to inspect them.