APIs & Integrations

LMiret
メンバー | Diamond Partner
メンバー | Diamond Partner

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 ?

 

Thank you so much for your help.

Best regards,

 

1件の返信
MichaelC
ガイド役 | Solutions Partner
ガイド役 | Solutions Partner

Identify a record change in Hubspot and recover from external API

@LMiret 

 

Hello!

 

On change:

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. 

 

https://developers.hubspot.com/docs/api/crm/contacts

Endpoint search. 

 

On deletion

No good way - but might be a work-around.

First of all - you may only find contacts that have been under deletion (for 90 days - not permanently deleted contacts)

MichaelC_0-1621610095022.png

Use the API:

https://api.hubapi.com/crm/v3/objects/contacts/?archived=true

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. 

 



Need further help with integrations or business development?



Want to help me?

Go to the following links and read through the ideas. If you like them - give the idea an upvote

Upvote the following ideas:

0 いいね!