Create a new automation workflow.
Scopes:
automations.write
Trigger condition examples
The trigger.condition field defines the event that enrolls contacts into the automation. Most trigger events use standard Events API event names and may require origin. Built-in trigger events, such as "birthday", do not use origin.
For the "birthday" trigger, omit trigger.condition.filterGroups to enroll contacts on the day of their birthday. To shift the trigger time, add one filter group with exactly one filter:
| Field | Operator | Value shape |
|---|---|---|
birthdate | eq | Hour offset string from the birthday, e.g. "-24h", "48h" |
Birthday trigger on the contact birthday
{
"condition": {
"event": "birthday"
}
}
Birthday trigger before the contact birthday
{
"condition": {
"event": "birthday",
"filterGroups": [
{
"logicalOperator": "and",
"filters": [
{"field": "birthdate", "operator": "eq", "value": "-24h"}
]
}
]
}
}
Birthday trigger after the contact birthday
{
"condition": {
"event": "birthday",
"filterGroups": [
{
"logicalOperator": "and",
"filters": [
{"field": "birthdate", "operator": "eq", "value": "48h"}
]
}
]
}
}
To trigger an automation when a contact enters a specific segment, use the entered segment event with origin: "omnisend" and filter the trigger condition by segment_id. This is different from audienceFilterGroup, which only restricts who can enter after the trigger fires.
Trigger when a contact enters a specific segment
{
"condition": {
"event": "entered segment",
"origin": "omnisend",
"filterGroups": [
{
"logicalOperator": "and",
"filters": [
{"field": "segment_id", "operator": "eq", "value": "000000000000000000000001"}
]
}
]
}
}
Audience filter group examples
The trigger.audienceFilterGroup field is optional. When set, only contacts matching the filters are enrolled when the trigger fires — omit it to enroll everyone who triggers the event.
Supported fields
| Field | Operators | Value shape |
|---|---|---|
segmentID | eq, neq | Segment ID string, e.g. "000000000000000000000001" |
tag | eq, neq | Tag name, e.g. "vip" |
dateAdded | eq, neq, gt, lt | ISO-8601 date, e.g. "2025-03-15" |
firstName | eq, neq, contains, notContains | Free string, e.g. "John" |
lastName | eq, neq, contains, notContains | Free string, e.g. "Smith" |
gender | eq | "m" or "f" |
country | eq, neq, contains, notContains | ISO-2 country code, e.g. "US" |
state | eq, neq, contains, notContains | State / region name, e.g. "California" |
city | eq, neq, contains, notContains | City name, e.g. "New York" |
postalCode | eq, neq, contains, notContains | Postal code string, e.g. "10001" |
Where it fits
audienceFilterGroup is a sibling of condition inside trigger:
{
"name": "...",
"trigger": {
"condition": {
"event": "...",
"origin": "..."
},
"audienceFilterGroup": { ... }
},
"blocks": [ ... ]
}
Each example below shows only the audienceFilterGroup value — slot it into the skeleton above.
Restrict to a single segment
{
"logicalOperator": "and",
"filters": [
{"field": "segmentID", "operator": "eq", "value": "000000000000000000000001"}
]
}
Include one tag, exclude another
{
"logicalOperator": "and",
"filters": [
{"field": "tag", "operator": "eq", "value": "early-adopter"},
{"field": "tag", "operator": "neq", "value": "beta-churned"}
]
}
Gender (only `eq`, only `"m"` or `"f"`)
{
"logicalOperator": "and",
"filters": [
{"field": "gender", "operator": "eq", "value": "f"}
]
}
Country + city substring match
{
"logicalOperator": "and",
"filters": [
{"field": "country", "operator": "eq", "value": "US"},
{"field": "city", "operator": "contains", "value": "York"}
]
}
Recent contacts only (date cohort)
{
"logicalOperator": "and",
"filters": [
{"field": "dateAdded", "operator": "gt", "value": "2025-01-01"}
]
}
OR across multiple tags
{
"logicalOperator": "or",
"filters": [
{"field": "tag", "operator": "eq", "value": "vip"},
{"field": "tag", "operator": "eq", "value": "beta"}
]
}
AND across name, country, and tag
{
"logicalOperator": "and",
"filters": [
{"field": "firstName", "operator": "contains", "value": "John"},
{"field": "country", "operator": "eq", "value": "US"},
{"field": "tag", "operator": "eq", "value": "vip"}
]
}