Desarrolladores
Reglas del formulario
Lógica condicional que decide qué conexiones se activan para un envío determinado.
What are Form Rules
A Form Rule is conditional logic that decides which connections fire for a given submission — send to Discord only when a plan field equals "enterprise", or route to a different webhook depending on a dropdown value. Rules are gated behind the Connections module, the same as connections themselves.
A connection that no rule ever mentions still fires unconditionally, whenever it's enabled — adding rules never silently breaks a connection you haven't targeted yet.
Conditions
Each rule has one condition: a field, an operator, and (for most operators) a value to compare against.
| Operator | Meaning |
|---|---|
| eq | field equals value |
| neq | field does not equal value |
| contains | field contains value (substring) |
| gt | field is numerically greater than value |
| lt | field is numerically less than value |
| is_empty | field is empty or missing |
| is_not_empty | field is present and non-empty |
Then / Else connections
A rule names which connections fire when its condition matches ("then") and which fire when it doesn't ("else") — either list can be empty. A connection targeted by more than one rule fires if any of those rules' matching branches include it: rules combine as a union, not a priority order.
curl -X POST https://api.tryembedio.com/v1/forms/frm_xxxxxxxxxx/rules \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Route enterprise leads to Discord",
"condition": {"op": "eq", "field": "plan", "value": "enterprise"},
"thenConnectionIds": ["conn_abc123"],
"elseConnectionIds": []
}'Combining conditions with AND / OR
A condition can itself be a group — "and" or "or" over a list of nested conditions — for logic like "plan equals enterprise AND seats is greater than 10".
{
"op": "and",
"conditions": [
{ "op": "eq", "field": "plan", "value": "enterprise" },
{ "op": "gt", "field": "seats", "value": 10 }
]
}Enabling and disabling
Each rule can be toggled independently from the Rules panel without deleting it — a disabled rule is skipped entirely, as if it didn't exist, so any connection it would have targeted goes back to firing unconditionally once no enabled rule targets it.
Documentos relacionados