# Build an automation flow

> Add Send email, Wait, Condition, Operation and Webhook steps in the automation editor, and change the automation settings.
>
> Source: https://docs.mailniaga.com/automation-editor/

The automation editor is the canvas where you put the steps after the trigger. Each step is a card, for example **SEND EMAIL** or **WAIT**. Subscribers move from the top to the bottom, one card after the other.

## Open the editor

The editor opens automatically after you click **Create automation**. To open an automation that exists, do these steps.

1. Click **Campaigns** → **Automation**.
2. On the row of the automation, click **Edit workflow**.

The top bar of the editor shows **Back**, the automation name and the status **ACTIVE** or **PAUSED**. It also shows the **Activate** or **Pause** button, **Statistics**, **Settings** and **Fullscreen**.

*(Screenshot: The automation editor with the TRIGGER, WAIT and SEND EMAIL cards, and the + button below the cards)*

## Add a step

The first card on the canvas is **TRIGGER**. Do these steps to add a step below it.

1. Click **+** below the card.
2. In **Add node**, choose the type of step.
3. Click the new card to open the step panel on the right side.
4. Fill in the fields of the step.
5. Click **Save**. Mail Niaga shows "Saved".

The **Add node** popup has five types of step.

*(Screenshot: The Add node popup with five types of step)*

| Step | What it does |
|---|---|
| **SEND EMAIL** | Sends one email to the subscriber. |
| **WAIT** | Waits for a time period, or until a date and time. |
| **CONDITION** | Checks a condition, then sends the subscriber to the **YES** branch or the **NO** branch. |
| **OPERATION** | Changes subscriber data: a tag, a list or a field. |
| **WEBHOOK** | Sends an HTTP request to another system. |

## Wait step

The **WAIT** step holds the subscriber before the next step. Below **HOW LONG SHOULD WE WAIT?**, choose one of these two modes.

| Mode | When to use it |
|---|---|
| **For a duration** | Wait for a fixed time period. Choose a period in the **COMMON WAITS** list, for example **1 day** or **3 days**, or type a period such as `2 weeks`. |
| **Until a date / time** | Wait until a date and time, for example `next monday`, `tomorrow 9am` or `2026-12-31T18:00`. |

*(Screenshot: The WAIT panel with the COMMON WAITS list)*

## Condition step

The **CONDITION** step has two branches below it: **YES** and **NO**. Add different steps below each branch. To choose the type of condition, click **Choose action** in the step panel.

| Condition | What it checks |
|---|---|
| **Email opened** | If the subscriber opened an email from this automation, in the time period that you set. |
| **Email clicked** | If the subscriber clicked a link in that email. To check only one link, paste its URL in **LINK URL (OPTIONAL)**. |
| **Has tag** | If the subscriber has the tags that you choose. In **MATCH**, choose **Has any of these tags**, **Has all of these tags** or **Has none of these tags**. |
| **Subscriber field** | If a subscriber field matches a value. In **COMPARISON**, choose for example **is**, **contains**, **is greater than** or **is blank**. |
| **Subscriber status** | If the subscriber status is one of the statuses that you tick: **Subscribed**, **Unconfirmed**, **Unsubscribed**, **Blacklisted** or **Spam reported**. |

For **Email opened** and **Email clicked**, choose the email in **EMAIL TO CHECK** and the wait period in **TIMEOUT (HOW LONG TO WAIT FOR THE EVENT)**. These two conditions need **Track opens** or **Track clicks** on the **SEND EMAIL** step that they check.

*(Screenshot: The list of conditions below Choose action in the CONDITION panel)*

## Operation step

The **OPERATION** step changes subscriber data. To choose the action, click **Choose action** below **ACTION** in the step panel.

| Action | Result |
|---|---|
| **Add tag(s)** | Adds tags to the subscriber. |
| **Remove tag(s)** | Removes tags from the subscriber. |
| **Copy to list** | Adds the subscriber to another list too. |
| **Move to list** | Moves the subscriber from the list of this automation to another list. |
| **Update field** | Sets a new value in a subscriber field. |

*(Screenshot: The list of actions below Choose action in the OPERATION panel)*

## Webhook step

The **WEBHOOK** step sends an HTTP request to another system, for example your CRM. Choose a saved HTTP config in **HTTP config (optional preset)**, or fill in **Method** and **URL** yourself. The default method is POST.

## Delete a step

Click the step card, then click **Actions** at the bottom of the panel. Choose one of these two options.

| Option | Result |
|---|---|
| **Delete (keep children)** | Deletes only this step. The steps below it connect to the step above. |
| **Delete with children** | Deletes this step and all the steps below it. |

## Move & zoom the canvas

Drag the canvas to move the view, and use the mouse wheel to zoom. At the bottom right, click **Zoom out**, **Fit to screen** or **Zoom in**. Click **Fullscreen**, or press the F key, for a full screen view. To go back, click **Exit fullscreen**.

## Automation settings

Click **Settings** in the top bar to open the automation settings. Mail Niaga saves the changes immediately.

| Setting | What it is for |
|---|---|
| **AUTOMATION NAME** | The automation name in the table. |
| **MAILING LIST** | The list that this automation monitors. Click **Change** to change it. |
| **TIMEZONE** | The panel says that this is the time zone for date triggers and recurrent triggers. |
| **EXIT CRITERIA** | Conditions that stop a run early. Click **+ Add criterion**, choose a condition below **STOP THE RUN WHEN…**, then click **Save criterion**. Mail Niaga checks it before each step. |

The conditions in **EXIT CRITERIA** are the same as the conditions of the **CONDITION** step: **Email opened**, **Email clicked**, **Has tag**, **Subscriber field** and **Subscriber status**. The run stops when one of the conditions becomes true.

*(Screenshot: The automation Settings panel with MAILING LIST, TIMEZONE and EXIT CRITERIA)*

> **Caution**
> If you change the **MAILING LIST**, Mail Niaga deletes all the trigger sessions and subscriber runs of this automation. The flow of steps stays. The **Change mailing list** popup asks you to confirm with the **Switch list & wipe runs** button.

*(Screenshot: The Change mailing list popup with the Switch list & wipe runs button)*

## Messages for steps that are not complete

A card that is not complete shows a message. **Activate** does not work while a step is not complete. These are some frequent messages:

| Message | What to do |
|---|---|
| "Pick a trigger event" | Click the **TRIGGER** card and choose a trigger. |
| "No email bound" | Click the **SEND EMAIL** card and fill in the email: the subject, the sender and the template. |
| "Pick an email template" | Choose a template in the **SEND EMAIL** step. |
| "Set the wait duration" | Set the period in the **WAIT** step. |
| "Pick a condition kind" | Choose a condition in the **CONDITION** step. |
| "Pick an operation" | Choose an action in the **OPERATION** step. |
| "Pick an HTTP config or set a URL" | Fill in the **URL** or choose an HTTP config in the **WEBHOOK** step. |

## Tips

This advice helps you build a flow without problems:

- **Click Save in each step panel.** Mail Niaga saves each step separately. It does not save the full flow at one time.
- **Add a Wait between two emails.** Without a **WAIT**, the subscriber gets the second email immediately after the first email.
- **Set the correct list before the automation is active.** A later list change deletes all the subscriber runs.

## Common issues

### Why is the automation not active after I click Activate?

A step is not complete. The card of that step shows a message, for example "Set the wait duration". Click the card, complete its fields, click Save, then click Activate again.

### What is the difference between Delete (keep children) and Delete with children?

Delete (keep children) deletes only one step, and the steps below it connect again to the step above. Delete with children deletes the step and all the steps below it.

### Why did all the subscribers go from the automation after I changed the list?

When you change the MAILING LIST in Settings, Mail Niaga deletes all the trigger sessions and subscriber runs of that automation. The flow of steps stays.
