Details
Looking to send an email using an automation, but want to prevent the email from being sent twice if the contact gets overwritten or updated later on? This can be achieved by adding filtering steps in your automation.
Some examples of this could be:
- You have a welcome email that sends whenever someone subscribes, or gets added by the API - but you don't want this welcome email to send if the contact already exists & is merely getting updated.
What This Example Will Cover
In this article, we'll build an email automation that sets a field value on the contacts record once the welcome email is sent. Then we'll configure the initial email send step to only send it if this value is not present.
How-to Guide
Part 1: Add a New Field To Store if the Email Was Sent
- Select Lists and Forms from the sidebar.
- Your lists will be shown. Locate the list you'd like to work with, and double-click on it to open it into Forms view.
- On the right hand side, you'll see a list of current fields. Click Add New Fields.
- Select the Text field type and give the field a name. For example, 'Welcome email sent'.
- When finished, click .
- By default, the field you just created will appear on the form you were editing. To remove it from the form, click the 👁️ icon next to the field name on the right hand side, as shown.
- Click to close the form editor.
Part 2: Setting up the Automation (To Send the Welcome Email)
- Select Automation from the sidebar.
- Select the Advanced Automation tab.
- Click .
- Give the workflow a name and click .
- Click .
- In the first section, set the action as A trigger against the following List and select the list you'd like to monitor.
- In the second section, select the trigger. It could be Subscribe, API Upload or Update Profile - depending on your use case.
- Also in the second section in the Filter your Contacts area, click . The filtering dialog will appear.
- We want to filter out those who have already received the welcome email, so select your recently created field (called 'Welcome email sent' in the case of our example) from the first dropdown, set the second dropdown to Does not contain and in the last one, enter YES - as shown.
- Click OK.
- In the third section, enable the checkbox for Send the Contact the Message and select your welcome email.
- In the fourth section, configure the timing of when to send the welcome email. In most cases, this would be set to Immediately.
- Click . You will now be taken back to the main screen for the automation you're building. You can rename the automation step if you wish.
Part 3: Setting up the Automation (To Set the Field Value Once the Email Is Sent)
Now we'll set the automation to record if the welcome email was sent - both on Opens, and Non-opens / Bounces. Essentially, we're setting the field value in all instances of the system sending the email.
- Click .
- In the first section, set the action as The following Message being sent and select the welcome message, as well as the list to monitor (the same one you used in the previous part of this guide).
- In the second section, select the trigger as Open.
- In the third option, untick all options.
- Also in this third section, locate the Change the following value(s) in the Contact record section and click .
- Setup the options as follows - this is how we're signaling that the welcome email was sent.
- Click .
- In the fourth option, set the timing as Immediately.
- Click .
- Click again.
- In the first section, set the action as The following Message being sent and select the welcome message, as well as the list to monitor (the same one you used in the previous part of this guide).
- In the second section, select the trigger as Not Opened & Not Bounced.
- In the third option, untick all options.
- Also in this third section, locate the Change the following value(s) in the Contact record section and click .
- Setup the options as follows - this is how we're signaling that the welcome email was sent.
- Click .
- In the fourth option, set the timing as Immediately.
- Click . You will now be taken back to the main screen for the automation you're building. You can rename the automation step if you wish.
Part 4: Activate Your Automation
- Select Automation from the sidebar.
- Select the Advanced Automation tab.
- Finally, click next to the automation and choose Activate.