APIs & Integrations

yorambaron
Participant

How to get rid of spam contacts using the HubSpot API?

Hi All,

I want to share with you an idea that I have implemented to get rid of spam contacts using the HubSpot API.

I assumed that a contact is not a spam in case one of the two conditions are met:

A. It has an owner id.

B. Someone from the organization sent him an email.

 

I implemented the following algorithm using the HubSpot API:

1. Read all contacts, save all contacts that have no owner, these contacts are suspected as as spam contacts, For each contact save its associated company. However, it is still possible that contacts without assigned owners are not spam conrtacts. 

2. Generate a list of all email messages that you sent, using the Engagement API, if a message is sent to a contact in the from list (#1), it is assumed that this contact is not a spam contact.

3. Prepare a list of all the domains of #2, a contact that its domain is in this list is not a spam contact.

4. The remaining list of #1 has the spam contact and company list.

 

Regards,

Yoram

 

0 Upvotes
1 Reply 1
dennisedson
HubSpot Product Team
HubSpot Product Team

How to get rid of spam contacts using the HubSpot API?

@yorambaron 

Thanks for sharing this idea!

0 Upvotes