You may expect Hubspot webhooks API to support email events (i.e. delivered, bounced, opened, clicked), but you’ll be surprised that it does not. Their webhooks API is for their CRM objects mainly (contacts, companies, deals). Although, there is a separate Events / Email Analytics API that your app could poll.

WebhooksAnswer

If you built email marketing solutions using Mandrill (now MailChimp), or SparkPost (that took many former Mandrill users), or SendGrid, you expect a certain model of working with the email marketing platforms:

  1. You send non-transactional emails to a large number of recipients;
  2. Subscribe to webhooks to receive email events;
  3. Process important events and update the statuses of your leads/contacts.

HubSpot is more than an email marketing platform, it’s a full-fledged CRM, so obviously, the platform can handle those three steps on its own and just keep all your contacts properly updated. But there are still many companies that use other CRMs, and use HubSpot just for email marketing. And other CRM platforms build email marketing integrations with HubSpot. Their integrations kind of need to tap into the Events API. We considered a couple of approaches for this integration when helping ours clients:

  • Subscribe to the CRM contact updates/webhooks. HubSpot contacts have about 25 email information fields (i.e. hard bounce reason, first/last email click dates, first/last email open dates, unsubscribed from all emails, …). Perhaps detecting changes of those fields could be good enough in some cases.
  • Poll the Events API regularly to receive the actual email events. Then you can have a more common event processing code for your MailChimp, SendGrid, SparkPost integrations. It’s just the polling requirement will complicate your code.

We decided to add a new HubSpot poller into the Aurinko platform so that Aurinko apps could subscribe to the HubSpot email events through Aurinko’s Webhook API and Aurinko users could have simpler code. At the moment, these webhooks will be bringing the native HubSpot API payload.

Also, the HubSpot connector (serviceType) has been added to Aurinko API, which allowed us to extend our Contacts Sync API to this CRM.