Share feedback, ideas and get community help

Updated last year

Hey I need help in js

At a glance

The community member is looking to create a business schedule in Typebot, where they can limit the day and time, and have the flow follow a specific path if the current time is within the schedule, or send a specific message if it's not. The community members suggest using custom code in the Set variable block to achieve this, and provide an example of how to get the current hour of the day using JavaScript.

good night everyone. I want to work with schedules in typebot. For example, I want to create a business schedule of my choice, limiting the day and time, and put it in a condition so that if it is within the schedule it will follow the flow, and if not, send a specific message. When you give the service time in this case, it sends the message for the rest of the funnel. How would I do this through js?
B
L
4 comments
You are spamming the general channel. Posting here is enough!
You should be able to do that with custom code in the Set variable block
To get the current hour of the day for example:

Plain Text
const currentDate = new Date();
return currentDate.getHours();
Sorry and thanks baptiste
Add a reply
Sign up and join the conversation on Discord