set_conditions
Set conditions — Set conditional-dispatch rules for a webhook+trigger so only matching events leave the site.
Set conditional-dispatch rules for a webhook+trigger so only matching events leave the site. conditions MUST be an object {"enabled":true,"type":"and"|"or","rules":[{"field":"<dot.path into the captured payload>","operator":"equals|not_equals|contains|not_contains|greater_than|less_than|is_empty|is_not_empty|is_true|is_false|array_contains|object_contains","value":"..."}]}. A rule may add an optional "cast":"number"|"string"|"boolean"|"stringify" to coerce the payload value before comparing (e.g. numeric compare on a string field). A rules item may also be a nested group {"type":"group","match":"and"|"or","rules":[...]} (Pro only; without a Pro license only ONE simple rule with type "and" is allowed). Run get_trigger_schema first and take field paths from the real captured payload (e.g. "args.0.form_id"). Registered as the WordPress Ability flowsystems-webhook-actions/set_conditions, so external AI tools (Claude Code, Cursor) can call it over MCP or REST with a scoped API token.
/ Plan step shape
{ "ability": "set_conditions", "input": { "webhook_id": …, "trigger": …, "conditions": …, "conditions_evaluate_on": … } }
/ Scope & confirmation
Minimum API-token scope for external (MCP/REST) callers: full. Runs without a confirmation pause (the overall plan is still user-approved before execution starts).
/ Input fields
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| webhook_id | param | integer | yes | |
| trigger | param | string | yes | |
| conditions | param | object | yes | |
| conditions_evaluate_on | param | string | — | original | transformed |
/ Examples
Plan step as the AI Builder proposes it
{ "id": "step_1", "ability": "set_conditions", "summary": "…", "input": { "webhook_id": 12, "trigger": "wpcf7_mail_sent", "conditions": { "enabled": true, "type": "and", "rules": [ { "field": "args.0.form_id", "operator": "equals", "value": "16", "cast": "number" } ] } } }
/ Related