# Automations

An automation is a flow that runs on its own. A trigger enrolls a contact, and the contact moves through steps such as emails, waits and branches. Open Automations in the sidebar to see them. Each card shows a status and how many contacts are enrolled. **New automation** creates a draft with a trigger and opens the builder.

## The builder

The flow is a canvas of steps joined by lines. Click a step to edit it in the panel on the right. Use the plus button under a step (**Add a step**) to add an Action, Wait, Condition or End. Changes save about two seconds after you make them.

| Step      | What it does                                                                                                     |
| --------- | ---------------------------------------------------------------------------------------------------------------- |
| Trigger   | Starts the journey. Every automation has one, and it cannot be deleted.                                          |
| Action    | Does something to the contact. See below.                                                                        |
| Wait      | Pauses for a **Duration** (1 to 365) in **Hours** or **Days**.                                                   |
| Condition | Branches. Contacts follow **Yes** (left) or **No** (right). Choices: Has tag, Field equals value, Is subscribed. |
| End       | Contacts who reach it have completed the automation. A path with no next step also completes.                    |

A branch with nothing connected ends the journey for that contact. It never falls through to the other branch. Each step shows a count of the contacts waiting on it, and a step with contacts on it cannot be deleted until they move on.

### Actions

- **Send email:** pick a **Campaign**. Its subject and design go to the contact. The campaign is not sent to its own audience and can stay a draft. Sends count toward that campaign's stats and your monthly sending limit.
- **Add tag** and **Remove tag:** enter a **Tag name**.
- **Update field:** set First name, Last name or Status (Subscribed, Unsubscribed or Pending).
- **Send notification:** a **Subject** and an optional **Message**, emailed to the workspace owner when a contact reaches the step.
- **HTTP request (webhook):** a **URL**, a **Method** (POST or GET) and an optional JSON body that can use `{{firstName}}`, `{{lastName}}` and `{{email}}`. Requests to private or internal addresses are refused, redirects are not followed, and a request that fails is not retried.

A Send email step skips the contact, who then moves on, if no campaign is chosen, the contact is not Subscribed or is suppressed, your guardrails block the send, the monthly limit is reached, no mailing address is set, or the workspace is suspended. During quiet hours the contact waits at the step and the email goes out when they end. See [Sending Health](/docs/concepts/sending-health) and [Compliance](/docs/concepts/compliance).

## Triggers

Pick one under **Trigger event**.

| Trigger                           | Starts when                                                                                                                                                |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| New subscriber joins              | A Subscribed contact is created with Add contact or the [Contacts API](/docs/api/contacts), or someone confirms a double opt-in signup.                    |
| Tag added to contact              | Tags are added by editing a contact or through the API. Set **Tag** to match one tag, or leave it blank for any tag.                                       |
| Link clicked in email             | A person clicks a tracked link. Set **Link contains** to match part of the URL, or leave it blank for any link.                                            |
| Subscribed through an integration | A connected integration subscribes a contact.                                                                                                              |
| Custom event from your app        | Your app posts an event to `POST /api/v1/events`. Set **Event name**; case and spacing are ignored. Page views from site tracking arrive as `page_viewed`. |

CSV imports, bulk Add tag and tags added by another automation do not start triggers. See [Double Opt-In](/docs/concepts/double-opt-in) and [Email Tracking](/docs/concepts/tracking).

## How contacts run through a flow

- Contacts are enrolled only while the automation is **Live**. Someone who matches the trigger while it is a draft or paused is not enrolled later.
- The trigger needs a step connected to it, or nobody is enrolled.
- A contact is enrolled once per automation and is never restarted mid-journey. Turn on **Let contacts re-enter** to start a contact again, the next time the trigger fires, after they have finished or failed.
- The engine runs every minute. Steps that happen right away run back to back, up to 10 in one run, and a Wait schedules the next step.
- **Exit when**, above the canvas, ends the journey early: an event is recorded, a tag is added, or a link is clicked, with the value you enter. It is checked before every step. A goal with no value never matches.
- A contact is marked failed if a step errors or the step no longer exists.

## Status: Draft, Live, Paused

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| Draft  | Being built. Nobody is enrolled. Click **Publish** and confirm to go Live.                  |
| Live   | Enrolling contacts and running steps. Click **Pause** to stop.                              |
| Paused | No new enrollments, and contacts already in the flow stop where they are. Click **Resume**. |

Paused contacts stay in the flow. Their waits keep counting, so a contact whose wait ended while paused moves on as soon as you resume. The builder has no way back to Draft. To keep a copy, use **Duplicate** on the Automations page, which creates a Draft.
