Lists, Lead Scoring & Workflows

PZimathies
Contributor

Add delay hours before a date / time

Hello,

 

Is it possible to add a dealy on the same day of a date property hours before a date / time? 

 

Reason: people book appointments with us at a certain date and time. We want to send them an email 2 hours before the appointment takes place. 

 

We have the Marketing Enterprise Suite and Sales / Operations Hub Professional.

Thank you.

 

PS: Using the Meeting functionality is not an Option for us since HubSpot doesn't allow us to get info of the meeting properties into the email (like booked date / location and time) – which btw is a little baffeling that this isn't possible.

0 Upvotes
14 Replies 14
PZimathies
Contributor

Add delay hours before a date / time

@TomM2 

I unfortunately have to reopen this topic again because I face now the same issue as @jlbro . So the solution with operations Hub works as suggested but than the question becomes how do I use it in workflows to send it out at the exact time calculated in the date property? 

Either the flow enrolls everything at midnight or with the delay option in the flow I'm forced to set a time of the day, which also isn't what we want to do actually. 

I see with contacts there is a schedule around time properties option but in my case we are speaking about a deal workflow, where this option doesn't exists. 

Could you please help @TomM2 in how to set this up in this case?

0 Upvotes
PZimathies
Contributor

Add delay hours before a date / time

@TomM2 We did create a new datetime property via API and now everything worked. Thank you.

EstepheLP
Participant | Gold Partner
Participant | Gold Partner

Add delay hours before a date / time

Hello, can you explain how you used the properties resulting in the data format to trigger workflows please? 

0 Upvotes
PZimathies
Contributor

Add delay hours before a date / time

Unfortunately this above was my old answer at a time where i thought that Hubspot doesn't just ignore a time Property in workflows. But it turns out it does. 

So we now found a wokraround which is extremly convoluted but this is from what i see the only way that hubspot offers us to do it. 

So what i did was after getting a new date/time property which has the sendout time that i want, i extract the hours of the time in this property into a new property called "delay number" with operations hub (yes hubspot even charges extra for this....):

Bildschirmfoto 2024-08-14 um 09.32.45.png

 

after that I created a worflow based on the date/time property to enroll all deals when the date/time property is met. Since Hubspot ignores time (even in a date/time property!!!) completely, all Deals get enrolled at midnight. So then I added a delay based on the outcome of the new property i created above. So if the hours in the new property say 04 than i add a 4 hour delay. If the hours say 05 than i add a 5 hour dealy and so on. This then looks something like this:

Bildschirmfoto 2024-08-14 um 09.36.38.png

Based on this the email will at least be send at the right hour before our appointment. I hope this helps you a little bit.

And i also hope that someone from @hubspot or @Tom can react to this and see what ways we have to go through just to send out an email at a certain time... 

EstepheLP
Participant | Gold Partner
Participant | Gold Partner

Add delay hours before a date / time

I tried implementing it for my company, but unfortunately I'm not sure of a few things:

  • Are there 3 different workflows?
    • 1 for setting a property like meeting time in one hour
    • 1 for formatting (1st screenshot you sent)
    •  1 for the branches

Also, I'm not entirely sure how the "format_datetime([enrolled_object.meeting_in_24_hours], 'HH', 'America/New_York', 'de-DE')" format works...

 

Could you give me a hand? 

Thanks!

0 Upvotes
PZimathies
Contributor

Add delay hours before a date / time

Hey, 

 

sure, no problem. It's a little confusing. I understand. 

So yeah there a 2 workflows bascially. 1 workflow for calculating the date / delay and the other workflow for sending the email. 

 

The 1st Worklfow should be built something like this:

 

At the start you calculate the date and time at when you plan the sendout based on a original date. In our case we want to send the email 3 hours before and appointment date and then save this new date/time value in a separate property called "before appointment date". The custom code and actions in the workflow look like this then:

Bildschirmfoto 2024-08-15 um 11.10.17.png

 

After this directly in the same workflow we only want to extract the full hours of the time in this new property we created and save the hours in a new property called "delay time". You can do this by just adding the following 2 actions:

 

Bildschirmfoto 2024-08-15 um 11.10.36.png

Here in the brackest as the first value you can directly insert the before appt. date property that was calculated directly before in the same workflow and then you just need to set the right timezone and country.
IMPORTANT: Setting the timezone and locale is optional. You can also leave this out and everything will still work. The time will then be in the value that is set in the hubspot app. For me since I'm not in the US, i needed to adjust it to my local timezone.


You can keep the second value in the beackets (the 'HH') as seen above since this will give you the full time hours in the new delay property. 

But if you want to extract the hours (or even minutes) in a different format into the new property you can take a look here. Ther you can find all the formatting codes. For example typing 'h:mm a' in the brackets would result in 8:23 am.

 

That would be it for the first workflow. The second workflow is the one from the screenshot in my post before where you have all the branches based on the delay hours. 

 

Does this answer all your questions?

EstepheLP
Participant | Gold Partner
Participant | Gold Partner

Add delay hours before a date / time

This helps me a lot thank you so much!!!!

 

But just if HubSpot comes by: guys please, I agree with PZ, fix this hahahaha

0 Upvotes
PZimathies
Contributor

Add delay hours before a date / time

@TomM2 One additonal questions on this, does the new property (2 hours before time of meeting) need to be a datetime property also or is a date property fine? 

 

When we tested your example we got an error everytime telling us the property value isn't valid.

 

Bildschirmfoto 2023-10-23 um 16.44.52.png

Thank you 🙏

0 Upvotes
TomM2
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Add delay hours before a date / time

Hmm, strange, that seems to work fine in my portal with a date property! Have you set any rules for your date picker custom property? 

TomM2_0-1698073813761.png

 

 

Another solution would be to trigger a workflow based on your original date property and create a delay. So let's say you had "time of meeting" as a date property and you wanted to trigger a workflow an hour before. You could set the enrollment criteria as "time of meeting is less than 1 day away" then set a delay for 23 hours and then send the notification. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


PZimathies
Contributor

Add delay hours before a date / time

Hello Tom, 

 

thanks for the quick help with this topic. I will try this and let you know if it works for us, but looks totally doable. 

TomM2
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Add delay hours before a date / time

Hey @PZimathies this is possible with operations Hub and workflows. What you want to do is enroll contacts with your initial date/time property as a trigger. So let's say the date property is "time of meeting". You can create a custom property for "2 hours before time of meeting" or whatever you want. 

You enroll when this property is known, then you can use operations hub to use the "format data" action to subtract 2 hours from that initial property and copy the datetime into your new custom property. 

You can then use this new custom property in a new workflow to trigger whatever actions you wish to use! 

Something like this:

TomM2_1-1698056939262.png

 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


CMyhra
Contributor

Add delay hours before a date / time

Help! What do we put as the "field type" for Pre-Meeting?

0 Upvotes
jlbro
Participant

Add delay hours before a date / time

Hey Tom, thanks for providing this solution. We're almost there but are facing a small issue.

We have the -2hr datetime property setup and it's working. However, we can't work out how to use this datetime property as an enrollment trigger in a new workflow. This step which you refer to above...

"You can then use this new custom property in a new workflow to trigger whatever actions you wish to use!"

Our workflow seems to be ignoring the timestamp and just enrolls all contact at midnight on the corresponding date.

We have a lot of "same day meetings" booked so using the -1 day +23hr delay option doesn't really work for us either.

 

This is our enrollment criteria:

Screenshot 2023-12-21 at 10.46.15 am.png

EstepheLP
Participant | Gold Partner
Participant | Gold Partner

Add delay hours before a date / time

Hey! I'm encountering the same issue as you, could you fix it in the end and if yes, how?

0 Upvotes