Help

Can I use conditional logic in automation emails?

Topic Labels: Automations
Solved
Jump to Solution
1583 1
cancel
Showing results for 
Search instead for 
Did you mean: 
serpentor
4 - Data Explorer
4 - Data Explorer

I have an automation that generates an email.

In some cases the fields I want to include in the email are not set yet.

I want to add a conditional statement to the email composition, something like "If {name} is set, include {name} followed by a comma, otherwise skip straight to the text." I can't see a way to do this in the automations interface.

I know that I can add fields to the table to do this but I'm trying to figure out whether there is a way to handle this logic temporarily within the automation. 

 

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

You can have conditional actions with different send email actions. However, I don't recommend this for small version differences. There is no way to include conditional logic directly in the message body of the automation configuration.

One technique that I use is to create the body of the email with a formula field. Then in the automation, I simply include the formula field as the body and not other text. This method works well.

Another technique is to use a system like my Email Table extension (with a premium license) that merges record data with a mustache template.

See Solution in Thread

1 Reply 1
kuovonne
18 - Pluto
18 - Pluto

You can have conditional actions with different send email actions. However, I don't recommend this for small version differences. There is no way to include conditional logic directly in the message body of the automation configuration.

One technique that I use is to create the body of the email with a formula field. Then in the automation, I simply include the formula field as the body and not other text. This method works well.

Another technique is to use a system like my Email Table extension (with a premium license) that merges record data with a mustache template.