mailtanimailtani

Flow Campaigns

Flows are visual, event-triggered automation campaigns. Unlike broadcast campaigns (sent once to a list) or sequence campaigns (linear drip sequences), flows let you build branching automations that react to contact behaviour and lifecycle events.

Overview

A flow is built from a canvas of connected nodes. Each contact that enters the flow moves through the nodes in order, respecting delays and conditions along the way.

Flows are triggered automatically when a lifecycle event is fired — either via the API or from your application.

Node Types

Trigger

The entry point of every flow. Defines what causes a contact to enter the flow.

  • Trigger event — the lifecycle event that starts the flow (e.g. user.registered, trial.expiring)
  • A contact can only be enrolled in a flow once at a time

See Events & Automations for a full list of trigger events and how to fire them.

Send Email

Sends an email to the contact at that point in the flow.

  • Choose any email template from your account
  • Variables and spintax are supported in the email body
  • Uses inbox rotation if multiple sending emails are configured

Delay

Pauses the flow for a set amount of time before moving to the next node.

  • Configure in minutes, hours, or days
  • Useful for spacing out onboarding sequences or follow-ups

Audience Filter

Checks whether the contact meets a condition before continuing.

  • Filter on contact fields, tags, list membership, or custom field values
  • Contacts that do not match the condition exit the flow

Branch

Splits the flow into two paths based on a condition.

  • Yes path — contacts that meet the condition
  • No path — contacts that do not meet the condition
  • Both paths can continue with further nodes independently

Start Campaign

Enrolls the contact into another campaign (broadcast or sequence) from within the flow.

Stop Campaign

Removes the contact from another active campaign — useful when a contact converts and you want to stop a nurture sequence.

Building a Flow

  1. Go to Campaigns > New Campaign and select Flow as the type
  2. You'll be taken to the flow canvas editor
  3. The canvas starts with a Trigger node — click it to configure the trigger event
  4. Click the + button on any node's output to add the next node
  5. Click any node to open its configuration panel on the right
  6. When your flow is ready, click Activate to start processing new trigger events

Triggering a Flow via API

Flows are triggered by lifecycle events. Fire an event via the API and any flow with a matching trigger will enroll the contact automatically.

curl -X POST https://mailtani.com/api/v1/events \
  -H "Authorization: Bearer mk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "event": "user.registered",
    "properties": {
      "firstName": "Jane",
      "plan": "pro"
    }
  }'

See Events & Automations for the full events reference.

Notes

  • A contact can only be in the same flow once at a time. Firing the trigger event again while the contact is mid-flow has no effect.
  • Deleting a flow node while contacts are mid-flow will cause those contacts to exit the flow.
  • Flow emails use the same sending infrastructure as campaign emails — inbox rotation and warmup limits apply.

Creating Flows via API

When creating a flow campaign via POST /campaigns, you must specify trigger_type and trigger_config to configure the entry trigger:

{
  "name": "Trial Expiring Flow",
  "type": "flow",
  "trigger_type": "event",
  "trigger_config": {
    "event_name": "trial.expiring"
  }
}
FieldTypeDescription
trigger_typestringCurrently only "event" is supported
trigger_configobjectConfiguration for the trigger
trigger_config.event_namestringThe event name that starts this flow

Flows created via the API start in draft status. Activate them via the dashboard or POST /campaigns/{id}/activate.