How to Replace First Name with Default Text If It Doesn’t Exist in HubSpot Emails

  • read
  • Add to Flipboard Magazine.

I recently was trying to send an email to a list containing different contacts but some did not have the First Name field filled in and was blank. So I did some google searches for a solution and came across these two posts: HubSpot forum topic and HubSpot forum topic 2.

I tried the code shared in the posts and they must be outdated because they did not work for me. I wrote a cleaner version below that checks if the first name field has content and if so display the name. If the field is blank use some default text.

Table of Contents

The Code

What the code does

“Dear First Name,” OR “Dear Customer,”

New Industrial HubSpot Theme Released

Do you use HubSpot just for a blog or landing pages? No problem. this HubSpot theme contains the most common types of landing pages and a robust blog template to get you started. Learn More

Written by: Jacob Lett - Jacob is a marketing and web design consultant who helps manufacturers grow their revenue. Unlike his competitors, he focuses on small and consistent website design changes to increase results. He recently created the Industrial HubSpot Theme to help manufacturers quickly build their website on the HubSpot platform.
Category: Common Questions
Tags:

Want to Get Email Updates?

Receive a monthly digest of new tutorials and resources.