APIs & Integrations

niederberger
Participant

Webhooks > Creation also gives propertyChange

Hello. I’m in the middle of creating an integration with a couple 3rd party systems. I’m using the HubSpot Webhooks for it - works pretty well. I’m having on the Company Object the Creation and propertyChange listening. I’m just wondering, every time I create a company the propertyChange is also fired. I thought that’s probably just as it is. I’m just curious as other people are doing that. Perfect would be if you only can listen to the propertyChange of hs_lastmodifieddate but that doens’t work.

Thank you for your thoughts. Thomas.

0 Upvotes
3 Replies 3
niederberger
Participant

Webhooks > Creation also gives propertyChange

That's how I do it now. I check first if the incoming webhook has one object that creates the company. If that's true then I ignore the changes for that POST. Thank You for anwering.

Syeda_Fatima
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Webhooks > Creation also gives propertyChange

Yes @niederbergeryou can ignore those changes and only focus on the object that creates the company. This will ensure that your webhook is only creating companies, and not modifying any existing properties.

 

Regards,

Syeda

0 Upvotes
Syeda_Fatima
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Webhooks > Creation also gives propertyChange

Hey @niederberger, It's likely that the propertyChange is being fired when a Company Object is created because of the fact that the hs_lastmodifieddate property is changing. Unfortunately, there is no way to specifically listen for changes to the hs_lastmodifieddate property.

 

However, one workaround could be to keep track of the Company Objects that have been created and only listen to the propertyChange event for those that have already been created. This way, you would only be notified of changes to the Company Objects that already exist.

 

It's also worth noting that you should make sure to keep your webhooks up-to-date with the latest changes to the HubSpot API.

 

This will ensure that you are receiving the most accurate and up-to-date information.