Conditional Logic for Data Merges

Updated on:
July 28, 2021

The conditional logic is a great setting if you only want to create documents for certain rows within a spreadsheet.

In this article you’ll learn how to:

  1. Set up a condition
  2. Advanced settings for conditions

How to set up a condition

If you would like to set up a condition for a data merge, all you need to do is go to the Data Merge box and select 'condition' in the drop down menu.

After you have selected condition, the next step is to select the field the condition is based on. Open the next drop down menu and select the field. If the fiedl you want is not there you might have to click refresh in the the top right hand corner on the data sources table.

After that enter the value the field has to equal for the automation to run and bam! You're done :)

How to add advanced settings for conditions

It is possible to add a more advance filter that is based on two conditions (or a different operator other than 'equal') by adding another column to your spreadsheet. In this new column you can add a formula that contains the advanced conditions and then use the result of this column for the data merge. For example you could use a formula that looks like this:


Then you could set the condition in Portant to Merge based on when this column equals 'Merge'.

This is quite a good guide on using 'IF' & 'AND' functions together:

Feedback and feature suggestions

We created Portant only a few months ago, so any feedback or suggestions you have for us would be greatly appreciated. Please feel free to send us an email at or use our contact form here:


Blake and James

More than mail merge

You can do a lot more than just mail merge with Portant. Portant is a fully-fledged online document automation solution that can optimise many different document flows. You can use our online document automation platform to optimise your repetitive work, so you can get back to doing the work you enjoy.

Get startedAn animation showing a google document being created from a Trello card.