Preview rule
preview_rulePreview an UNSAVED rule against a sample of the latest run: match/change/exclusion counts, per-field change tallies, danger warnings (required fields emptied, identifiers stripped, heavy exclusion), audit deltas, and example before/after diffs. Nothing is written anywhere. Rule definition format: {"when":{"all":[conditions],"any":[conditions],"anyOf":[{"all":[conditions]}]},"then":[actions]} — anyOf is an OR of condition groups, AND-ed with the top-level conditions. Actions: set/copy/replace/append/prepend/lookup/extract/shorten/calculate/round/concat/normalize/strip_html/remove_duplicates (dedupe a separator-delimited list value)/clear/fallback/from_parent/exclude/exclude_group. Condition ops: eq, ne, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, regex, not_regex, gt, lt, gte, lte, between, not_between (take "values": [min,max]), longer_than, shorter_than, in_list, not_in_list (take "values": string[]), in_list_regex, not_in_list_regex (take "values" of regex patterns; match when any pattern matches), date_before, date_after ("today", "today+/-N" or "YYYY-MM-DD"), date_range_active, date_range_inactive (no value; test the ISO range in the field against now), empty, not_empty. Conditions may use "valueField" to compare against another field instead of a literal. Variant groups (items sharing custom:item_group_id): exclude_group {"match":"any"|"all", default "any"} removes the whole family when any/every member matches the conditions and must be the rule's only action; from_parent {"field"} copies the group parent's value onto matching variants (parent = the member whose id equals the group id, else the first member); the condition pseudo-field "group:size" is the family's member count (numeric ops only). Group exclusions are reported as whole groups in the preview warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feedId | Yes | Feed id from list_feeds. | |
| definition | Yes | The rule definition JSON to preview. |