Condition Action
The condition action evaluates filter conditions against request data and chain variables to control whether the automation chain continues or stops.
Configuration
{
"type": "condition",
"name": "Only process paid orders",
"config": {
"conditions": [
{"body.status": {"$eq": "paid"}}
],
"on_match": "continue",
"on_no_match": "stop"
}
}
Fields
| Field | Type | Required | Description |
|---|---|---|---|
conditions | array | Yes | Filter conditions to evaluate |
on_match | string | No | What to do when conditions match: "continue" (default) or "stop" |
on_no_match | string | No | What to do when conditions don't match: "continue" or "stop" (default) |
Filter conditions
Conditions use the same filter engine as Mock Response Rules. See that page for the full list of operators ($eq, $neq, $gt, $contains, $in, $regex, $and, $or, $not, etc.).
Conditions are evaluated against a merged context that includes both the incoming request data and any chain variables set by previous actions.
Available fields
| Field | Example | Description |
|---|---|---|
method | POST | HTTP method |
path | /api/webhook | Request path |
headers.<name> | headers.content-type | Request header |
query.<name> | query.token | Query parameter |
body.<path> | body.order.status | JSON body field (dot notation) |
Examples
Stop chain for non-POST requests
{
"conditions": [{"method": {"$eq": "POST"}}],
"on_match": "continue",
"on_no_match": "stop"
}
Only process specific event types
{
"conditions": [
{"body.type": {"$in": ["order.created", "order.updated", "order.completed"]}}
],
"on_match": "continue",
"on_no_match": "stop"
}
Complex condition with logical operators
{
"conditions": [
{
"$and": [
{"method": {"$eq": "POST"}},
{"body.amount": {"$gte": 100}},
{"headers.x-source": {"$exists": true}}
]
}
],
"on_match": "continue",
"on_no_match": "stop"
}
Stop chain on match (inverse logic)
Use on_match: "stop" to halt the chain when a condition is true — useful for filtering out unwanted events:
{
"conditions": [{"body.type": {"$eq": "ping"}}],
"on_match": "stop",
"on_no_match": "continue"
}