Get access to free tutorials, exclusive content and more.

Send Conditional Email with Ninja Forms!

Sending email triggered by form submissions is simple! A question we’re often asked is about the ability to send email only to certain people or departments based on what a user inputs into their form. Let’s take a minute and look at how to send conditional emails with Ninja Forms!

Install the Conditional Logic extension

To send a conditional email you first need to get and install our Conditional Logic extension. Conditional Logic adds the ability to set conditional statements throughout your form. Adding criteria to send conditional emails is just one part of this add-on.

You can find the other settings for conditional statements in the Advanced tab of the form builder. Your email actions, however, have conditional logic options conveniently baked into the Emails & Actions tab. Let’s walk through exactly how to set up statements to send a conditional email now!

How to Send A Conditional Email

For the purpose of this tutorial, let’s use the Quote Request form template. It’s available to you when you create a new form. Here’s what ours looks like to the person filling it out:

send conditional email example form

Say we want to send an email to the relevant department depending on how the “What services may we assist you with?” question is answered. If Consultation is checked, we want an email to go to the folks at consultation. If Development is checked, we want an email sent to the development people, etc. In short, we want an email sent to each department that gets ticked on this question, and if a department is left unticked, then no email is sent.

Let’s do this!

Step 1: Create an Email Action for Each Department

Easy peasy:

  1. Click the Emails and Actions tab in the form builder
  2. Add one email action for each department (click the little blue circle in the bottom right of your screen to slide open the actions menu window)
  3. Name each action appropriately so you don’t lose track of who’s who!

send conditional email created email actions

Step 2: Add a Conditional Statement to Each Email Action

This is also super easy. Click on the first email action to add a conditional statement. I’ll go with Consultation. That slides open the action’s settings window:

send conditonal email email action settings

Set up the To field, subject, and email message as appropriate to your needs. With that done, expand the Conditional Logic options that I have circled in the above screenshot.

You can see below how I’ve set the conditional statement for this email. You want this Process This action when “What Services May We Assist You With”  Has Selected the Consultation radio list option. This targets the Consultation radio list option of the “What services may we assist you with?” radio list field of the form, so that when it is checked and the form is submitted, this email action will fire. This email action will now not fire unless this condition is met!

send conditional email conditional statement

To finish, all you would need to do now is repeat Step 2 for the other 3 email actions, setting each conditional statement appropriately for that action. At that point, you have a form that will send a conditional email to any combination of 4 departments selected by the user in the form!

Send conditional emails to specific recipients based on what a user inputs into a form? Yes you can!

 

Now, it’s your turn to send some conditional emails

The sky is the limit when you have the Conditional Logic add-on added to your emails. Want to send reports submitted from a job site to the appropriate parties? Check.

Set triggers in a form that notify relevant parties when those values drop below or exceed a certain threshold? Check.

Automate email responses to certain individuals when given criteria are met? Check.

Mix it with a newsletter extension like MailChimp? Also possible.

Let us know what you use your conditional emails for in the comments section!