Conditional Form Routing to Google Sheets - Route by Field Value

Send form submissions to different spreadsheets or tabs based on what the user selected. Department, location, product type - any field can be a routing key.

What Is Conditional Form Routing?

Conditional routing is the ability to inspect a submitted form field and use its value to determine where the data is delivered. Instead of a single static webhook URL, you define rules like:

  • If department equals "Sales" > send to the Sales Team sheet
  • If department equals "Support" > send to the Support Queue sheet
  • If country starts with "US" > send to the North America sheet
  • If budget contains "enterprise" > send to the Enterprise Pipeline sheet

This is different from form-level conditional logic (showing or hiding fields based on user input). Routing happens after submission, at the delivery layer. The user never sees it - they just submit the form.

The 8 Routing Operators

SheetLinkWP provides eight comparison operators:

  • Equals - Exact match (case-insensitive). Example: department equals "Sales"
  • Not Equals - Matches anything except the specified value. Example: country not equals "US"
  • Contains - Field value includes the substring. Example: message contains "urgent"
  • Not Contains - Field value does not include the substring. Example: email not contains "@gmail"
  • Starts With - Field value begins with the specified prefix. Example: phone starts with "+44"
  • Ends With - Field value ends with the specified suffix. Example: email ends with "@company.com"
  • Regex - Matches a regular expression pattern. Example: zip regex ^(90|91|92)\d{3}$
  • Exists - Field has any non-empty value. Example: company_name exists

The regex operator accepts any valid PHP regular expression for complex pattern matching.

Setting Up Routing Rules

Configuring conditional routing in SheetLinkWP takes under five minutes:

  1. Open SheetLink > Routing Rules in your WordPress admin dashboard.
  2. Click "Add Rule" and select the form you want to route.
  3. Choose the field to evaluate. SheetLinkWP lists all fields from the selected form automatically.
  4. Pick an operator from the dropdown and enter your comparison value.
  5. Set the destination - either a different webhook URL pointing to another Google Sheet, or a tab name parameter.
  6. Assign a priority number (1 = highest priority). Click Save.
  7. Repeat for additional routing conditions.

Rules are evaluated top-to-bottom by priority. The first rule that matches determines the destination (unless you have enabled multi-destination mode).

Real-World Routing Examples

Department routing - A corporate "Contact Us" form has a "Department" dropdown with options: Sales, Support, Billing, Partnerships. Four routing rules send each department's inquiries to their team's sheet.

Location-based routing - An international company routes by the "Country" field. US visitors go to the North America sales sheet. European submissions go to the EMEA sheet.

Product type routing - An e-commerce site's pre-sales inquiry form includes a "Product Category" field. Electronics inquiries route to the electronics team, apparel to the apparel team.

Lead qualification routing - A B2B SaaS company routes based on "Company Size". Enterprises (1000+ employees) go to the enterprise sales pipeline. SMBs go to the self-serve funnel.

Priority Ordering and Conflict Resolution

When multiple routing rules could match the same submission, SheetLinkWP uses a deterministic priority system:

  • Lower priority number wins. A rule with priority 1 is evaluated before priority 2.
  • Same priority = insertion order. If two rules have the same priority number, the rule created first takes precedence.
  • Default fallback. If no rule matches at all, the submission goes to your default webhook URL. No data is ever lost.

Best practice: Put your most specific rules at the highest priority (lowest number) and your broadest rules at the bottom.

Multi-Destination Delivery

Sometimes you need a submission to go to more than one place. SheetLinkWP handles this two ways:

  • Multi-destination mode - instead of first-match-wins, all matching rules fire. The submission is delivered to every matching destination in parallel.
  • Fan-Out add-on - for more complex scenarios, the Fan-Out add-on ($19/mo) lets you define explicit multi-target delivery chains that send to Google Sheets, Slack, email, and webhooks simultaneously.

Both approaches use SheetLinkWP's retry queue, so if one destination is temporarily unavailable, deliveries to the other destinations are unaffected.

Frequently Asked Questions

What operators does SheetLinkWP support for conditional routing?

SheetLinkWP supports 8 operators: equals, not equals, contains, not contains, starts with, ends with, regex (regular expression matching), and exists (checks whether the field has any value at all).

Can I route a single form submission to multiple Google Sheets?

Yes. By default, routing uses first-match-wins logic. But if you enable multi-destination mode or use the Fan-Out add-on, a single submission can be delivered to multiple sheets simultaneously.

What happens if no routing rule matches a submission?

Submissions that do not match any routing rule are sent to the default webhook URL configured in your SheetLinkWP settings. This acts as a catch-all so submissions are retried automatically to minimize data loss.

Can I route to different tabs within the same Google Sheet?

Yes. Your Apps Script webhook can accept a tab name parameter. In SheetLinkWP's routing rule destination, you specify both the webhook URL and the target tab.

Does conditional routing work with all 7 supported form plugins?

Yes. Conditional routing is form-plugin-agnostic - it evaluates the submitted field values after the form plugin processes them. It works identically with Elementor, CF7, Gravity Forms, WPForms, Fluent Forms, Formidable Forms, and Ninja Forms.

Route every submission to the right sheet, automatically

Conditional routing is included in the free SheetLinkWP plugin. No add-on required for basic rules.