Identify a record change in Hubspot and recover from external API
Hello,
We have an external API calling the Hubspot API and we need identify (i) when there is a change in a record (Contact, Company, Deal) and (ii) when there is a deletion in a record (Contact, Company, Deal)
Do you know how to identify those "change" and "deletion" actions in Hubspot from an external API ?
Usually this would work through a workflow. Lets say a property has been changed - then trigger a workflow. In this workflow you would trigger a webhook calling your own API. When your api is call - do a checkup against your own register. For instance: do a API Contact Search - where property last activity - was within X seconds.
Problem with activity based workflows on dates is that they can only be triggered once. You may not re-enroll this (what I could find).
So an other option would be to set up a cronjob or similar where you search your api every minute or so to find all contacts that have the property last activity set to at least within the last two minutes or so.
This will help you get a list of all archived (contacts under deletion).
With deals, companies and other objects they are deleted so the only way is to keep your own regestry of all contacts and then do a call every minute or so to look for that specific contact. If you wont get a response (the data - the contact is deleted). You can use cronjobs or similar to do calls every minute.