APIs & Integrations

Not applicable

Code for validating emails

When importing data in bulk to Hubspot, Hubspot apparently runs a check to make sure that all emails are valid. If it encounters any invalid emails, the entire import is stopped. This creates issues when scheduling and relying upon our daily imports/updates with our user base, b/c invariably Hubspot will encounter 1 or 2 bad emails every week or so.

My development team would like to add this exact email validation check to our end, before exporting to Hubspot, so that we don’t trip the Hubspot import error. But I haven’t been able to figure out how Hubspot is validating emails. Does anyone know what algorithm Hubspot is using to determine whether an email is valid? Where can we find this? Or are there any good alternatives to filtering our emails of an invalid format/type? Thanks!

0 Upvotes
1 Reply 1
Dadams
HubSpot Employee
HubSpot Employee

Code for validating emails

Hi @ttepichin

You can find the rules we use to validate the format of the email address here:

How Does HubSpot validate email addresses?

HubSpot uses a few rules to validate the format of email addresses in the Contacts system.