Hello everyone!
I want to update my SQL database that reflects my hubspot deals but not using the last_modified_date, since it brings too mutch deals that actually didn´t brings us nothing new for our business (updating certain marketing property that doesn´t change anything in our analysis);
So what I want to do is, through an API, to update my deals database if 4 tipes of properties (using OR statement) were updated in the last 24 hours. I was using the SEARCH API, but I didn´t found how to filter then by the update date of these specific properties.
I´ve already tried different ways using workflows + webhooks, but in all cases the updates were not precise as I need to be;
Hey, @JLeandroCorre
Thanks for the interesting question. Can you share an example request and response using the Search API? Even if it didn’t return the expected result? Let’s also see if we can get the conversation started — @jpsanchez @taran42 @lynton @johnelmer, do you have any experience here?
Thank you all very much! — Jaycee
Yes, @Jaycee_Lewis , of course I can!
payload = {
"filterGroups": [
{
"filters": [
{
"propertyName": "pipeline",
"operator": "EQ",
"value": "3308305"
},
{
"propertyName": "hs_createdate",
"operator": "BETWEEN",
"highValue": hoje_i,
"value": ontem_i
}
]
}
],
"properties": [
"hs_lastmodifieddate"
],
"limit": "100",
}
This is my latest version of the payload I´m trying to use in my request. All I want to do is to use as a filter the timestamp of a property such as hubspot_owner_id;
I know that every object_id has it´s latest update timestamp, as shown right here:
"hubspot_owner_id": {
"value": "56548127",
"timestamp": 1654867152803,
"source": "API",
"sourceId": "PublicObjectResource",
"updatedByUserId": null,
"versions": [
{
"name": "hubspot_owner_id",
"value": "56548127",
"timestamp": 1654867152803,
"sourceId": "PublicObjectResource",
"source": "API",
"sourceVid": [],
"requestId": "6a07000f-ecc6-4a34-8f7b-a66d1c1e1df4"
}
Is it possible to make it? If don´t, how can I filter the data to update my SQL database with only the deals that had certain properties updated in the last 24 hours?
@JLeandroCorre Have you tried looking at Last Activity Date as a way to update your deals instead of Last Modified Date? I know I found that Last Modified Date was updated any time the slightest property changed in the deal, whereas Last Activity Date updated only when a significant change was made. I may have those backwards, as it’s been a while since I’ve played with it. It’s worth taking a look at though.
Hi,
I will suggest another walk arround.
Instead of your approuch ( focus in SEARCH API request). I will suggest:
This API CALL will For a given HubID and a given list, return contacts that have been recently added to that list, starting with the most recently added contact and pageing backwards. A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page, as specified by the “count” parameter.
To this i will call it “jiu jitsu”. ( use hubspot on your side Vs try to do all outside HubSpot)
Please let me know if it works or you need help with it bro!
Best
JP

Thank you, @jpsanchez
– Jaycee