Workflow actions based on time of the day

Hello,

Is it possible to :

A/ Have if/so branches based on the time of the day and the day of the week ?
or B/ Set up workflows to only be active at certain times of the days and days of the week ?
Use case : our sales reps don’t work on same hours or days (some work from 1 to 4PM, others from 4 to 7PM, some work on weekends only..). We use workflows to assign new leads who submitted a form request.

Objective : I would like to assign leads to different sales reps according to the time of the day or the day of the week.
- Ex . 1 : Monday 3 PM --> round-robin between Sales A,B,C / Monday 7 PM --> round-robin between Sales D,E,F.
Ex. 2 : Tuesday --> round-robin between Sales A,B,C / Sunday --> round-robin between Sales D,E,F.
Is that possible in Hubspot ? Or through other tools (e.g zapier.. ?°
Thank you,
Lucas

Hi @LucasGhc,

Yes, this is possible! In the settings tab of a workflow, you can set it to execute during specific times only:

For your lead rotation process, you would create a workflow for each ‘shift’. So instead of trying to build all shifts within one workflow, you have several workflows which are taking turns doing the same thing.

Workflow 1: executing weekdays 8am to 11am, assigning contacts to owners A, B, C

Workflow 2: executing weekdays 11am to 2pm, assigning contact to owners D, E, F

etc.

I would set the enrollment triggers to include ‘Contact has submitted form’ (consider narrowing it down to ‘less than 1 day ago’) and ‘Contact owner is unknown’.

Hope this helps!

This is great, but is there any way to also make this solve for cases where there are overlapping shifts?

For instance, the work-hours of my London team overlaps with our New York team by about 3 hours; our LA team’s shift overlaps with the NY shift by 5 hours; and our APAC team’s hours overlap with with our NY team by 1 hour and overlaps with our LA team by a few hours…
If each shift needs it’s own workflow -- will these workflows be able to accomodate equal ticket distribution during the during the overlapping hours when 2+ workflows are running actions simultaneously, or will it create an untenable conflict?

The accepted solution won’t work in this case.

The solution needs to be for certain actions to happen at certain times of the day. So if we have two members of staff, one works 8am-12pm and the other works 1pm-5pm, we would like to have an if/then branch where we can specific those times and have different actions come of each.

So if a new lead came in at 9am, it could be assigned to Staff A, for example.

The timing in the settings only dictates when the workflow actions take place. So if you set it for the times above, it would fire all actions during that time, and then if a lead came in at 6pm, it would just wait until 8am the next day.

The solution needs to be for time of the day and day of the week to be added to the if/then branch options.

Agreed. This would also help support my use case - that is, we enter MQLs into a sequence. After hours the sequnce starts with an email, while during business hours it’s a sequence that starts with a phone call. I have been unable to change things based on time of day which prevents me from accomplishing this without workarounds.

For anyone else still searching for this option…

You are correct. The accepted option does not work as written. The contact would go through both workflows at whatever time they are scheduled to run, thus duplicating the assignements and causing mass confusion.

You need a goal set for both workflows that would prevent the workflow from triggering as scheduled. That goal could be “Contact Owner is known.” Once the contact owner is known from the completion of Workflow A, then Workflow B will not run.
A step further would to create a property like “Contact Assigned?” Yes / No. Use your workflow to assign the contact and then use that as the goal for the two workflows.

It should work.

I’m sure you’ve moved on but if anyone else is looking for a way to do this, one workaround would be to use an API call in the workflow and copy the result. We have similar issues where we would like to route leads based on the hour they arrive. We got around this by making an API call, copying the hour of the day to a property, then using an If/Then router. @MFlint this would solve your issue.

Screen Shot 2022-12-12 at 16.03.25.png

I’ve seen multiple ideas all related to the same need, and the accepted solution has been noted to not work as intended. For my use case, the solution is particularly infeasible as it would expontentially grow the amount of workflows we are using to assign leads for the same purpose and feels very duplicative. Has anyone found a feasible solution for assigning leads based on time of day & day of week? Is HubSpot planning to enhance workflow logic to allow time-based assignment? Given the number of posts about this topic, it seems that many customers would benefit from this.