Lists, Lead Scoring & Workflows

kikhtenkod
Member

How days from now actually works in workflows conditions?

SOLVE

Hi,

I created workflow based on tickets that would send 2 email notifications: 1 notification 7 days before specific datetime and 1 notification 1 day before the same specific datetime. The workflow runs once a day based on schedule trigger at 12:00 AM GMT.

 

After trigger block there is a branch with condition "is less than ... days before". But it doesn't work the way I expected.

 

Condition "Due datetime is less than 8 days from now" from branch 1 was not true at the moment of workflow run:
from_now_condition.png

 

But I expected that it should be true, because in condition info tooltip there is a description for it: "'Days from now' includes full calendar days and the rest of today." and if the workflow is launched for specific ticket on January 7, 2025 12:01:56 AM GMT, "8 days from now" should be equal to January 15, 2025 11:59:59 PM GMT. "Due datetime" equals to January 14, 2025 11:59:00 PM GMT and is less than January 15, 2025 11:59:59 PM GMT.

Could you please explain how "days from now" is calculated? And what is the reason that branch 1 condition from the screenshot was not true?

0 Upvotes
1 Accepted solution
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

How days from now actually works in workflows conditions?

SOLVE

Hey @kikhtenkod "days from now" is calculated from the current day right now. The day resets based on midnight within your portal, so in this case it seems to be GMT based. 

 

It's worth noting that if you check your workflow enrollment criteria, "days from now" will be based on the "days from now" when you're checking your criteria, not when the contact enrolled on your workflow. 

From your screenshot it looks like the duedate set is Jan 14th and the action executed about 2 minutes after the due day was less than 8 days from now. So I'd say one of two things happened: 
1. The contact didn't have the "customer first time" value when they hit that criteria. 

2. A race condition hit where there were the criteria/enrollment/contact didn't update quick enough to hit this branch in the 2 minute window. Sometimes this can happen depending on server speed and HubSpot update cycles. 2 minutes is a long time so I would imagine it's more likely the first issue. But it's impossible to tell without seeing the exact contact record. 

 

Hopefully that helps with your troubleshooting a bit tough! 

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.


View solution in original post

0 Upvotes
2 Replies 2
kikhtenkod
Member

How days from now actually works in workflows conditions?

SOLVE

@TomM2,

My account had GMT+00 timezone at the moment of enrollment. I have tested workflow with 6 tickets with the same "Due datetime" property set to January 14, 2025 11:59:00 PM GMT and "Notification step" set to "Customer first time". Condition for all of these tickets were not true at the moment of enrollment (January 7, 2025 12:01:56 AM GMT). Unfortunately I can't remember when I checked the criteria "days from now", it can be earlier than 6th January. If it was the 5th of January, then this explains such behavior. Here is a screenshot of one ticket history and enrollment history, you can see from history that property had non-null value:ticket_history.png

 

Now I think it doesn't matter to me anymore, because this workflow requires from user to check the workflow criteria at least once a day to update the "days from now" for it. But I need fully automated workflow.

 

I tried to use such workflow for next task: an external service sends API requests to create tickets in Hubspot to notify customers about events related to the product they bought, which are scheduled for a certain date. The automated workflow should notify the customer 7 days before the event planned date and 1 day before this event planned date. The planned date of the event is set by the external service as custom property "Due datetime" when creating the ticket and it is individual for each ticket, it can be 1-2 months in advance.

 

I figured out how to do all this, but I don't know what is the best way to perform the action on each ticket entity, once 7 days before the due date value in property "Due datetime" and 1 day before the same property "Due datetime". Can you recommend what workflow functionality is better to use to implement such scheduling? Is the best way is to use "Delay" block with trigger based on filter criteria for such purposes? For example, a part of workflow to schedule specific action 7 days before "Due datetime" with "Delay" block:

delay-block.png

 

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

How days from now actually works in workflows conditions?

SOLVE

Hey @kikhtenkod "days from now" is calculated from the current day right now. The day resets based on midnight within your portal, so in this case it seems to be GMT based. 

 

It's worth noting that if you check your workflow enrollment criteria, "days from now" will be based on the "days from now" when you're checking your criteria, not when the contact enrolled on your workflow. 

From your screenshot it looks like the duedate set is Jan 14th and the action executed about 2 minutes after the due day was less than 8 days from now. So I'd say one of two things happened: 
1. The contact didn't have the "customer first time" value when they hit that criteria. 

2. A race condition hit where there were the criteria/enrollment/contact didn't update quick enough to hit this branch in the 2 minute window. Sometimes this can happen depending on server speed and HubSpot update cycles. 2 minutes is a long time so I would imagine it's more likely the first issue. But it's impossible to tell without seeing the exact contact record. 

 

Hopefully that helps with your troubleshooting a bit tough! 

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.


0 Upvotes