Automations
Event-driven sequences of steps that send mail and update contacts.
An automation is a graph of steps joined by connections. A custom event starts a run for a contact.
Events
Create an event with POST /events (names cannot start with resend:). Fire it for a contact with POST /events/send. Automations whose trigger matches the event start a run.
Steps
| Type | Does |
|---|---|
trigger | Starts the automation. It cannot have incoming connections. |
send_email | Sends an email, usually from a template |
delay | Waits for a duration |
wait_for_event | Waits for another event or a timeout |
condition | Branches on a rule |
contact_update | Edits the contact |
contact_delete | Deletes the contact |
add_to_segment | Adds the contact to a segment |
Connections are default, condition_met, condition_not_met, timeout and event_received. A condition step needs exactly one condition_met and one condition_not_met connection. A wait_for_event step can use default, event_received and timeout.
Manage
- Create with
POST /automations. Enabling checks that referenced segments exist. POST /automations/{id}/stopstops it.POST .../duplicatecopies it.- Runs:
GET /automations/{id}/runsandGET /automations/{id}/runs/{run_id}. Run status isrunning,completed,failedorcancelled; an individual step can also beskipped.
Runs advance from /internal/automations/run, so they need your background jobs. An import from Resend fires no automations.