Skip to main content
Version: 5.1

HubSpot

HubSpot event integrations receive webhook callbacks from the HubSpot CRM platform and trigger handler functions as changes occur to companies, contacts, conversations, deals, tickets, products, and line items. Use them to sync CRM data in real time, trigger downstream workflows on record changes, and react to associations, merges, and restores without polling the HubSpot API.

Creating a HubSpot service​

Service and listener configuration​

hubspot:Listener is initialized with a ListenerConfig record and a listenOn port. The listener starts an HTTP server on that port to receive HubSpot webhook callbacks, and uses the client secret to validate the HubSpot request signature.

FieldDescriptionDefault
clientSecretThe client secret of the HubSpot app, used to verify incoming webhook request signatures.Required
callbackURLThe callback URL registered with the HubSpot app for webhook subscriptions.Required
listenOnThe port on which the listener accepts incoming webhook requests from HubSpot.8090

Event handlers​

WSO2 Integrator adds handlers for the selected HubSpot object service. Each remote function receives a hubspot:WebhookEvent record carrying fields such as objectId, propertyName, propertyValue, subscriptionType, occurredAt, and portalId, with the populated fields depending on the event.

ServiceHandlersTriggered when
CompanyServiceonCompanyCreation, onCompanyDeletion, onCompanyPropertychange, onCompanyAssociationchange, onCompanyMerge, onCompanyRestoreA company record is created, deleted, has a property changed, has an association changed, is merged into another, or is restored
ContactServiceonContactCreation, onContactDeletion, onContactPropertychange, onContactAssociationchange, onContactMerge, onContactRestore, onContactPrivacydeletionA contact record is created, deleted, has a property changed, has an association changed, is merged, is restored, or is deleted for privacy compliance
ConversationServiceonConversationCreation, onConversationDeletion, onConversationPropertychange, onConversationPrivacydeletion, onConversationNewmessageA conversation thread is created, deleted, has a property changed, is deleted for privacy compliance, or receives a new message
DealServiceonDealCreation, onDealDeletion, onDealPropertychange, onDealAssociationchange, onDealMerge, onDealRestoreA deal record is created, deleted, has a property changed, has an association changed, is merged, or is restored
TicketServiceonTicketCreation, onTicketDeletion, onTicketPropertychange, onTicketAssociationchange, onTicketMerge, onTicketRestoreA support ticket is created, deleted, has a property changed, has an association changed, is merged, or is restored
ProductServiceonProductCreation, onProductDeletion, onProductPropertychange, onProductMerge, onProductRestoreA product record is created, deleted, has a property changed, is merged, or is restored
LineItemServiceonLineItemCreation, onLineItemDeletion, onLineItemPropertychange, onLineItemAssociationchange, onLineItemMerge, onLineItemRestoreA line item is created, deleted, has a property changed, has an association changed, is merged, or is restored

Attach a service for only the object type you need to subscribe to; each service is independent and can be attached to the same hubspot:Listener.

What's next​