Automation Examples
Each example is a complete steps and connections pair. Send it to Create Automation, replacing the IDs, domains, event names and keys with your own. The step types and their settings are described in Automation Steps.
Welcome series with a delay
New subscribers to a list get a welcome email, then a tips email two days later. once keeps a contact who leaves and rejoins the list from getting the series twice.
{
"steps": [
{
"key": "trigger",
"type": "trigger",
"name": "Joined the newsletter",
"config": {
"event": "list_added",
"list_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f72",
"reentry": { "mode": "once" }
}
},
{
"key": "welcome_email",
"type": "send_email",
"name": "Welcome email",
"config": {
"template_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f70",
"from_domain": "mail.example.com",
"from_prefix": "hello",
"from_name": "Acme",
"subject": "Welcome to Acme, {{firstName|there}}"
}
},
{
"key": "wait_2_days",
"type": "delay",
"name": "Wait 2 days",
"config": { "duration": { "value": 2, "unit": "days" } }
},
{
"key": "tips_email",
"type": "send_email",
"name": "Getting started tips",
"config": {
"template_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f71",
"from_domain": "mail.example.com",
"from_prefix": "hello",
"from_name": "Acme"
}
}
],
"connections": [
{ "from": "trigger", "to": "welcome_email", "type": "default" },
{ "from": "welcome_email", "to": "wait_2_days", "type": "default" },
{ "from": "wait_2_days", "to": "tips_email", "type": "default" }
]
}
Abandoned cart
Your backend sends a cart_abandoned event with a cart_url field. The run waits up to 4 hours for an order_placed event. If one arrives, the event_received branch has no connection, so the run ends. If not, the contact gets a reminder email and then an SMS with a link back to their cart. window lets a contact in at most once a day.
{
"steps": [
{
"key": "trigger",
"type": "trigger",
"name": "Cart abandoned",
"config": {
"event": "custom_event",
"event_name": "cart_abandoned",
"reentry": { "mode": "window", "window_hours": 24 }
}
},
{
"key": "wait_for_order",
"type": "wait_for_event",
"name": "Wait for an order",
"config": {
"filter": {
"type": "group",
"operator": "and",
"conditions": [{ "type": "event", "event_name": "order_placed" }]
},
"timeout": { "value": 4, "unit": "hours" }
}
},
{
"key": "reminder_email",
"type": "send_email",
"name": "Reminder email",
"config": {
"template_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f75",
"from_domain": "mail.example.com",
"from_prefix": "shop",
"from_name": "Acme Store",
"subject": "You left something in your cart"
}
},
{
"key": "reminder_sms",
"type": "send_sms",
"name": "Reminder SMS",
"config": {
"content": "Acme Store: your cart is waiting {{event.cart_abandoned.cart_url}}",
"purpose": "marketing"
}
}
],
"connections": [
{ "from": "trigger", "to": "wait_for_order", "type": "default" },
{ "from": "wait_for_order", "to": "reminder_email", "type": "timeout" },
{ "from": "reminder_email", "to": "reminder_sms", "type": "default" }
]
}
Follow up on an unopened email
New contacts get a welcome email. Three days later, those who opened it are tagged as engaged; those who did not get an SMS instead. The condition reads the email that welcome_email sent in the same run.
{
"steps": [
{
"key": "trigger",
"type": "trigger",
"name": "Contact created",
"config": { "event": "contact_created", "reentry": { "mode": "once" } }
},
{
"key": "welcome_email",
"type": "send_email",
"name": "Welcome email",
"config": {
"template_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f70",
"from_domain": "mail.example.com",
"from_prefix": "hello",
"from_name": "Acme"
}
},
{
"key": "wait_3_days",
"type": "delay",
"name": "Wait 3 days",
"config": { "duration": { "value": 3, "unit": "days" } }
},
{
"key": "opened_welcome",
"type": "condition",
"name": "Opened the welcome email?",
"config": {
"filter": {
"type": "group",
"operator": "and",
"conditions": [
{
"type": "message_engagement",
"target_type": "automation_step",
"target_id": "welcome_email",
"channel": "email",
"action": "opened"
}
]
}
}
},
{
"key": "tag_engaged",
"type": "add_tag",
"name": "Tag engaged",
"config": { "tag_id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f73" }
},
{
"key": "welcome_sms",
"type": "send_sms",
"name": "Welcome SMS",
"config": {
"content": "Hi {{firstName|there}}, your Acme account is ready: https://example.com/start",
"purpose": "marketing"
}
}
],
"connections": [
{ "from": "trigger", "to": "welcome_email", "type": "default" },
{ "from": "welcome_email", "to": "wait_3_days", "type": "default" },
{ "from": "wait_3_days", "to": "opened_welcome", "type": "default" },
{ "from": "opened_welcome", "to": "tag_engaged", "type": "condition_met" },
{ "from": "opened_welcome", "to": "welcome_sms", "type": "condition_not_met" }
]
}