Reference

How routing rules work

The exact semantics of RouteForms's rule engine. For the narrative version see /google-forms-to-slack-routing; this page is the spec.

Model

Each form has an ordered list of rules and one default destination. On every submission, RouteForms walks the rules top-to-bottom. The first rule that matches wins, its destination receives the Slack post, and no further rules are evaluated. If no rule matches, the default destination receives the post.

A rule is the tuple (field, operator, value, destination). Field is the Google Form question title. Operator is one of ten (listed below). Value is the comparison value (omitted for is_empty / is_not_empty). Destination is a Slack webhook URL.

Operators

The ten supported operators, with exact semantics:

OperatorMatches when…Value type
equalsField value equals comparison value (case-insensitive, trimmed)string
not_equalsField value does not equal comparison valuestring
containsField value contains comparison value as a substring (case-insensitive)string
not_containsField value does not contain comparison valuestring
>=Numeric field value ≥ comparison valuenumeric
<=Numeric field value ≤ comparison valuenumeric
>Numeric field value > comparison valuenumeric
<Numeric field value < comparison valuenumeric
is_emptyField value is empty or whitespace-only(none)
is_not_emptyField value has any non-whitespace content(none)

Field-name matching

The rule's field is matched against Google Forms question titles. Matching is:

  • Case-insensitive. "Budget" matches "budget" and "BUDGET".
  • Whitespace-trimmed. " Budget " matches "Budget".
  • Exact otherwise. No fuzzy matching. "Budget" does NOT match "Budget (USD)". Renaming the question without updating the rule silently breaks routing.

If a rule references a field that doesn't exist in the submission, the rule does not match. RouteForms falls through to the next rule. To audit field names, paste a real submission into /tools/google-forms-field-extractor and copy the exact strings.

Numeric parsing

For numeric operators (>=, <=, >, <), both the field value and the rule value are normalised before comparison:

  • Currency symbols ($, , £, ¥, , , ) are stripped.
  • Commas as thousands separators are stripped.
  • Currency-code suffixes (usd, eur, gbp, inr, etc., case-insensitive) are stripped.
  • Trailing k multiplies by 1,000. l by 100,000. cr by 10,000,000.
  • Whitespace is trimmed.

So all of the following compare as 50000:

"$50,000"
"50,000 USD"
"50k"
"50K"
"50000"
"50,000.00"
"₹50,000"

And the following compare as 10,000,000 (₹1 Cr):

"₹1 Cr"
"1Cr"
"1 cr INR"
"10,000,000"

If the field value can't be parsed as a number (e.g. "medium"), the numeric rule does not match, the engine falls through.

Multi-value fields (checkboxes)

Google Forms checkbox questions arrive as a comma-joined string: "Email, Slack, SMS". The string operators apply directly:

  • contains "Slack" matches when Slack is one of the checked values.
  • equals "Slack" only matches if Slack is the only checked value.
  • not_contains "Email" matches when Email was not checked.

Evaluation order

Rules are evaluated strictly top-to-bottom. First match wins. There is no implicit OR / AND across rules, each rule is independent.

Implication: put specific rules above general ones. A specific Budget ≥ 100000 → #vip-leads rule must sit above the more general Budget ≥ 50000 → #hot-leads, or every $100k+ lead lands in #hot-leads instead.

For AND-combined conditions across multiple fields, you currently need to write one rule per field combination. (Rule composition is on the roadmap.)

Default destination

The default destination is the form's primary Slack webhook, the one set on the Slack tab of the form's settings. If no rule matches, the post goes there.

If the default is also empty, RouteForms records the response with status SKIPPEDin the delivery log, nothing posts to Slack but the submission isn't lost. Use this state intentionally only if you want some responses to silently land in the log without alerting. Otherwise, set a fallback channel.

Testing rules

Two ways to verify rules before they affect production submissions:

  • Standalone simulator. /tools/routing-rule-simulator , paste a sample submission and rules; see which rule fires.
  • Dashboard simulator.Inside RouteForms, every form's Routing rules tab includes a simulator pre-filled with the most recent real submission. Edit and click Run test; no Slack post is made.