Send to email based on zip

Scenario: I have 8 sales people who are each assigned to about 20 zip codes we provide service in. When the visitor completes the contact form the email is sent to the sales person that covers that zip code.

When I configure routing I tried entering zip codes in the value separated by a comma with no spaces and then I tried with comma and space, neither way worked, I never got the emails.

If I create individual rules it works, but that is a lot of rules to create and manage.

Is there an easier way to do this? Maybe an add-on or trick I haven’t figured out.


It won’t work with multiple values in one rule. That whole string would be evaluated for a match, and it never would.

You can use the gform_notification filter to set up your routing rules, with all the ZIP codes hard-coded in an array.

Here is the example of using that filter to configure routing rules:

It will require some code, but certainly would be less tedious than configuring 160 or so routing rules.

Thank you, I’ll give it a try.

1 Like