Hubspot CRM Object Search with Custom Date and Time Zone Adjustment

I am completely stumped. I’ve been trying to do this workflow for years and I am at a point where I need it done.

Goal: search hubspot deals custom property (date field) 120 days from today.

Today = May 10, 20223
Search: September 7, 2023

My test account: https://us1.make.com/2081/scenarios/961619/edit
(you might have to add 121 days from today, if you are testing on May 11th)

Confirming the deal is in Hubspot:

Search for CRM Objects
Property: mdate = “September 7, 2023 12:00 AM”

Get a Deal (same deal id as above)
Property: mdate = “September 7, 2023 12:00 AM”

Make an API call (same deal id as above)
Property: mdate = “2023-09-07”

FYI Hubspot property says:
These rules are based on your account’s time zone (UTC -07:00 PDT).

TEST A

Property: mdate = “1694070000410” = didn’t work
{{formatDate(setHour(setMinute(setSecond(addDays(now; 120); 0); 0); 0); “x”; “America/Vancouver”)}}

Any suggestions?

Hi @JaysonBrown

We don’t have access to your scenario. Can you please provide some more details? Some things that could be useful for us are:

  • What behaviour are you seeing?
  • How is the behaviour different from your expectation?
  • I assume the problem relates to a hubspot module. What is the input to the hubspot module?
  • What’s the response of the hubspot module?
1 Like

Using Hubspot module: Search for CRM Objects

with filters:

“a”: “dealstage”,
“b”: “5a795674-58c4-48a5-83dc-72369d09b9e0”,
“o”: “EQ”

Returns this deal, this confirms the deal exists.

[
{
“id”: 13290616488,
“properties”: {
“createdate”: “2023-05-10T17:41:14.388Z”,
“hs_lastmodifieddate”: “2023-05-12T20:57:32.158Z”,
“hs_object_id”: 13290616488,
my_date”: “2026-05-01T07:00:00.000Z”
},
“createdAt”: “2023-05-10T17:41:14.388Z”,
“updatedAt”: “2023-05-12T20:57:32.158Z”,
}
]

I want to use the Hubspot Search module: Search for CRM objects + property = my_date, to find this deal using this function

{{addDays(now; 1085)}}

So I need to convert the above function into unix milliseconds.

I tried this:

{{formatDate(addDays(now; 1085); “x”)}}

Which calculates this unix timestamp: 1777669379206

Results = 0