OverviewBeta
Automations
Automations run steps such as sending an email, waiting or updating a contact when a trigger fires. Learn contexts, statuses, runs, credits and the API.
An automation is a workflow that starts on its own: when a trigger fires, such as a contact joining an audience or an email bouncing, Emailit starts a run that works through the steps you’ve connected, such as sending an email, waiting a day or updating the contact. Use automations for welcome emails, onboarding sequences, birthday emails, forwarding and alerts.
How it works
- A trigger fires. Every automation starts with one trigger, for example Added to audience. Optional filters narrow it down.
- Emailit starts a run for the contact or email that caused it, and charges 3 credits.
- The run works through the steps connected to the trigger, one after another. Wait steps pause the run, and Condition steps send it down a Yes or No branch.
- The run ends when it reaches the last step of its branch, or fails if a step fails.
You build the flow on a canvas in the dashboard, or send it to the API as a list of steps and connections. See Triggers and Steps.
Contexts
Each automation has a context, which decides what a run is about and which triggers and steps are available. You choose it when you create the automation, and it can’t be changed later.
| Context | Label | Each run is about | Good for | Triggers |
|---|---|---|---|---|
| Contact | Easy | One contact | Welcome series, onboarding, re-engagement | Audience membership, contact changes, date anniversaries |
| Medium | One email | Reply handlers, auto-forwarders, bounce alerts | Email events, such as delivered, bounced or received | |
| Event | Advanced | One API call | API-driven flows, custom integrations | A manual trigger you call with the API |
In the dashboard, the Event context shows a Soon badge and can’t be selected yet. You can create Event automations with the API.
Create an automation
-
Start. Go to Email MarketingAutomations and select New automation.
-
Choose the context. Pick Contact or Email.
-
Choose a template. Pick one of the ready-made recipes or Start from scratch for a blank canvas with just a trigger.
-
Name it. Enter a Name and an optional Description, then select Create. The automation opens as a draft.
-
Build the flow. On the Editor tab, select the trigger and each step to configure them, and add steps with the plus buttons. Select Save.
-
Start it. Select Start. From now on, every matching trigger starts a run.
The list page has tabs for Contact, Email and Event automations and shows each one’s Name, Status, Last triggered time and Created date.
Statuses
| Status | Triggers start runs | Editable in the dashboard | How to get there |
|---|---|---|---|
| Draft | No | Yes | Every new automation starts as a draft. |
| Running | Yes | No | Start a draft or paused automation. |
| Paused | No | Yes | Pause a running automation. Start resumes it. |
| Stopped | No | No | Only with the API’s stop endpoint, which also cancels every run in progress. |
Pausing stops new runs from starting, but runs already in progress continue, including those waiting in a Wait step. Delete, in the menu at the top of the automation, removes it in any status.
Editing rules
The Editor tab is only available while the automation is a draft or paused. On a running automation, the tab shows Pause to edit.
Save checks the whole flow and highlights the steps that need attention, for example a Send email step without a template or a wait longer than 30 days. Fix them and save again before you select Start: starting doesn’t run the checks again.
Runs
A run is one pass through the automation for one contact, email or API call. Each run has a status:
| Run status | Meaning |
|---|---|
| Running | The run is working through its steps or waiting. |
| Completed | Every step on the run’s path finished. |
| Failed | A step failed, or the workspace didn’t have enough credits when the run started. |
| Canceled | The automation was stopped with the API while the run was in progress. |
By default, every trigger starts a new run, even if the same contact or email already has one in progress. The same event never starts two runs of one automation. See Runs and stats for the run history and debugging.
Credits
| Action | Credits |
|---|---|
| Each run | 3, charged when the run starts |
| Each email sent by a Send email step | 1 |
| Each email sent by a Forward email step | 1 |
If the workspace doesn’t have 3 credits when a trigger fires, the run is created with status Failed and the reason insufficient_credits in its meta. If credits run out in the middle of a run, the Send email or Forward email step fails. See Credits.
Use the API
The Automations API manages automations and reads their runs. It needs an API key with Full Access.
| Endpoint | Use it to |
|---|---|
| Create, update, retrieve, list and delete | Manage automations. Steps and connections are sent together. |
| Start, pause and stop | Change the status. |
| Trigger a run | Fire a Manual trigger, with an optional payload. The automation must be running. This is only possible with the API. |
| List runs, retrieve a run, statistics and step statistics | Read the run history and per-step results. |
The API also accepts automation settings that the dashboard doesn’t show yet:
| Setting | Default | Effect |
|---|---|---|
allow_reentry |
true |
Set to false to skip new runs for a contact or email that already has a run in progress. |
max_concurrent_runs |
0 (no limit) |
Skip new runs while this many runs are in progress. |
cooldown_seconds |
0 |
Skip new runs for a contact or email that started a run within this many seconds. |
on_step_failure |
stop |
stop fails the run when a step fails. skip lets the run continue. |
Skipped runs aren’t created and don’t use credits.
curl https://api.emailit.com/v2/automations \
-X POST \
-H "Authorization: Bearer $EMAILIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"context": "contact",
"name": "Welcome email",
"settings": { "allow_reentry": false },
"steps": [
{ "key": "trigger-1", "type": "trigger", "trigger": "contact.added_to_audience", "config": { "audience_id": "aud_5hJ2kL8mNp4Qr" } },
{ "key": "send_email-1", "type": "action", "action": "send_email", "config": { "type": "template", "template_id": "welcome" } }
],
"connections": [
{ "from": "trigger-1", "to": "send_email-1", "branch": "default" }
]
}'The automation is created as a draft. Call Start an automation to turn it on.