Shared Email Templates for Microsoft Outlook

How to insert part of Outlook email template by condition

No matter how well-crafted your Outlook email template is, there are times when you wish to make it special for certain recipients. Instead of creating multiple versions of the same template or tweaking each message manually before sending, you can use Insert-If sections to automate the job. These sections allow you to customize the template's content based on specific criteria, so that only the people who need to see it will see it. Here are some practical examples of how you can tailor your messages without extra hassle.

Video: How to conditionally insert part of Outlook template into email

How to conditionally insert part of Outlook template into email

Learn how to customize your template using If-sections. This feature allows you to insert different template parts based on the conditions you set.

Insert part of email template for specific recipients

Suppose you're drafting a team-wide or organization-wide email template and wishing to include a particular line exclusively for your team lead or boss. Or imagine sending an offer to your clients and including something very special just for your VIP customers. Instead of manually removing that part from an email sent to anyone else, you can configure the condition based on the To, Cc or Bcc field. Here's how to do it:

  1. Select the relevant section. When creating a new template or editing an existing one, select the part where the condition applies. This can be a paragraph, a list of items, a specific item of the list, an image, a table, or a table row – essentially any element within the email template.
  2. Add a condition. Right-click the selected element and choose Add condition from the context menu.
    Add a condition for a specific element within the email template.
  3. Set up the condition. Configure the condition based on your specific criteria:
    • In the Find in dropdown menu, pick Message field.
    • Under Select field, choose a field that will be checked for the condition. Normally, it's the To field, in some scenarios it might also be Cc or Bcc.
    • Under Select condition, choose the logical operator: "is equal to" to match the whole email address or "contains" to match the domain name or some part of the email address.
    • In the Text box, type the email address or its relevant part, depending on the chosen logical operator.
    • Once the condition is set up, click OK.

As an illustration, let's say you want to add a "Special offer" paragraph only to emails sent to addresses with the "@vip-client.com" domain. To make this happen, you create the condition like this:
Set up the condition based on your criteria.

When done, the template element to which the condition applies is visibly marked with a vertical green bar indicator.
The template element to which the condition applies is marked with a vertical green bar indicator.

Now, whenever you send an email to someone who fits the condition, the entire template, including the If-section, will be inserted. However, when sending emails to other addresses, the If-section won't be included. This ensures that your special additions are delivered exclusively to the right audience, making your messages more personalized and effective.

Insert part of template based on email content

There may be times when you need to tailor specific sections of your email template based on the content of the message body or subject line.

Let's take the example of sending a welcome email to new members of your partner program, which has three levels: Bronze, Silver, and Gold. Your template includes a table that outlines all these levels, but you only want to include the row relevant to the recipient's partnership level.

Assuming the program level is mentioned in the subject line, here's how you can achieve this using If-sections:

  1. Start editing your email template.
  2. Right-click on the table row you want to include for a specific level, and then choose Add Condition for Row from the context menu.
    Add a condition for a table row.
  3. Configure the condition with the following criteria:
    • Under Find in, select Message field.
    • Under Select field, choose subject.
    • Under Select condition, opt for contains.
    • In the Text box, type a word of phrase that the subject line surely contains ("bronze" in our case).
    • If the character case of the condition text matters, select the Case-sensitive box. Otherwise, leave it unselected.
    • When done, click OK.

    Configure the condition for the table row.

  4. In a similar manner, create the conditions for other table rows, such as Silver and Gold in our case.

As a result, you will have three different conditions, one for each row of table data. No condition is created for the header row, so it will be included in all messages.
A condition is created for each table data row.

When sending a message to your partner using this template, the relevant row will be inserted based on the partnership level mentioned in the subject line.
The relevant table row is inserted based on the subject line.

As you may know, Shared Email Templates allows you to incorporate dropdown lists in your templates. Taking it a step further, If-sections enable you to insert different template parts based on the dropdown value you select for a particular email. You can base your conditions on either existing dropdowns or those created exclusively for use with If-sections. Let's take a closer look at both options.

Scenario 1: Create a dropdown menu exclusively for If-section

When sending a welcome email to your new partner, suppose you wish to clearly specify the program level by selecting from predefined values in a dropdown list. Here's how you can do it:

  1. At the end of your template, add a dropdown list by following these instructions. Here are a couple of important points to keep in mind:
    • Enter the items corresponding to the conditions you'll set. In our case, there are 3 program levels (Bronze, Silver, and Gold), so we'll have 3 conditions and 3 items.
    • Select the For insert-if sections only checkbox, as this dropdown is only needed for validating conditions.

    Create a dropdown list with the items corresponding to the conditions you plan to set up.

  2. In your template, right-click the Bronze table row and choose Add Condition for Row from the context menu.
  3. Set up the condition like this:
    • In the Find in dropdown menu, select WhatToEnter result (WhatToEnter is the macro for creating a dropdown).
    • Pick the name of the dropdown list that you created in the first step.
    • Choose "is equal to" for condition.
    • In the Text box, type the text that exactly matches the target dropdown value.
    • When finished, click OK.

    Configure the condition based on the dropdown value.

  4. Repeat the above steps to create conditions for other table rows.

When pasting the template into a message, you will be prompted to choose the partnership level from the dropdown list:
Choose the partnership level from the dropdown list.

Upon selection, the template's content will be inserted in the email, including only the relevant table row.

Scenario 2: Use an existing dropdown

Now, let's talk about another frequent use case. Imagine you already have a dropdown list in your template that puts the chosen value right where you want it in your email. Guess what? That same value can also serve as the basis for your condition. An example will make this easier to understand.

In the template below, there is a dropdown list, named Choose level, that inserts the value you select into the first paragraph:
A dropdown menu is added to an email template.

The value you pick from that dropdown can also determine which table row to include in the email. For this, you set up the conditions just like we did in Scenario 1 above, skipping step 1. Why? Because you already have a dropdown in place, and you don't need another one. Naturally, in this case, the For insert-if sections only checkbox should be unselected, as your dropdown not only sets the condition but also inserts the selected value in the message text. It's like two birds with one stone :)

Hopefully, these examples have given you some good ideas on how you can use conditional If-sections in your templates to tailor your communications for various scenarios. This not only makes creating emails faster, but also ensures that each recipient gets information that is specifically relevant to them.

Post a comment

Seen by everyone, do not publish license keys and sensitive personal info!

If you have any questions or issues with this add-in, please feel free to post your concerns in the comments area. As soon as we answer, a notification message will be sent to your e-mail. If you do not want to share your thoughts in public, please contact us at support@ablebits.com.