I absolutely loved your walk through and the video, very helpful and informative. But, I have just one question regarding the implementation of this. What if I wish to book and schedule an appointment in someone else's calendar, how would I approach this using your implementation? Thank you
@pvergadia4 жыл бұрын
You can set it up in someone else's calendar the same way you did in yours..see the calendar API here developers.google.com/calendar/create-events
@jonathanclifton83733 жыл бұрын
I've followed this exactly but despite the calendar having responding vacancies, no matter what date structure I try I always get the same response: I'm sorry, there are no slots available for Invalid Date. What could the causes of EVERYTHING I try being an "Invalid Date" be please?
@luis96xd Жыл бұрын
Amazing video, concise and everything worked well! Thanks Priyanka! 🤗
@waleedumar9663 жыл бұрын
Great video but I am facing an issue. I get the output for confirmation of appointment booking but the schedule is not added to the Calendar. Can anybody please help out? Have to finish this for the semester project
@testtestowy51615 жыл бұрын
Bug : " intent.Map('Intent Name') Line 74" Change those lines : let intentMap = new Map(); intentMap.set('Schedule Appointment', makeAppointment); agent.handleRequest(intentMap); Where intentMap.set('your intent name', requiredEntityName->in this case makeAppointment as provided in "Entity Tutorial")
@thepedrorriva3 жыл бұрын
So, is it suppose to look like this? let intentMap = new Map(); intentMap.set('NAME OF YOUR INTENT', makeAppointment); agent.handleRequest(intentMap); }); or this? let intentMap = new Map(); intentMap.set('NAME OF YOUR INTENT', requiredEntityName->in this case makeAppointment as provided in "Entity Tutorial") agent.handleRequest(intentMap); }); I'm confused by your explanation.
@bhairavajosyularaghunath43712 жыл бұрын
Thanks Priyanka for the videos and I am a beginner in learning this GCP online on my personal interest. Especially very easy to follow your way of explaining the things.
@russellcampbell34634 жыл бұрын
line 99 : "err ? reject(err) : resolve(event); I am getting an error " Expected an assignment or function call and instead saw an expression" anyone able to solve this? Would have never gotten this far on my own.
@thepedrorriva3 жыл бұрын
same here. Did you solve it?
@krishnakantdharekar7463 жыл бұрын
@@thepedrorriva did you figure out how to make this work . Please help
@geovilla8215 жыл бұрын
Hi, thanks for this lesson. Great help! Please make a lesson also on how to read/save data to google sheets!
@talhachafekar55134 жыл бұрын
Use gspread library in python along with google API along with Flask/Django
@Adeymolahubs Жыл бұрын
How can I suggest another free time of appointment for that day since the Tim of the day is booked already?
@segunawodokun5 жыл бұрын
If you're having issues creating a calendar, make sure the intent name matches in intent.Map('Intent Name') Line 74
@nicolasfredesfranco90473 жыл бұрын
I don't have enough words to thank you
@hemalathasangani70585 жыл бұрын
I followed as it is but I am not getting output. In my Google Calendar it doesn't show any appointment added. What should I have to do.? It displaying response like "I'm sorry, there are no slots available for Invalid Date."
@Deany37914 жыл бұрын
Hi Hema! I had the same issue. My solution was to edit the index.js file to change the timeZone constant to the time zone that my Google Calendar is set to. I am in the UK so I set it to "GMT". But you would need to change it to your timeZone accordingly. You can find a list of acceptable Google Calendar api time zones here: stackoverflow.com/questions/22526635/list-of-acceptable-google-calendar-api-time-zones
@cedricpendji49723 жыл бұрын
I had the same issue, here is what i did to fix it: Below is the code given in the template const timeZone = 'America/Los_Angeles'; const timeZoneOffset = '-07:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('-')[0] + timeZoneOffset)); As we can see, the timezone in the template is 'America/Los_Angeles', But as I live in a different timezone, I changed code accordingly: const timeZone = 'GMT'; const timeZoneOffset = '+02:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('+')[0] + timeZoneOffset)); Remember to select the timeZoneOffset corresponding to your location (mine is +02:00) Check how I replaced the last split in the code from '-' to '+' as offset for me is '+02:00'
@ifeanyindukwe30865 жыл бұрын
This is great, thank you. However, I have tried but I keep getting this error message; "I'm sorry, there are no slots available for Invalid Date". Is there any way I can resolve this issue?
@Budgetbloom065 жыл бұрын
I resolve this error. You just have to change the code to """ const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('+')[0] + timeZoneOffset)); """ Also I'm from india so I've chaged this to.... const timeZone = 'Asia/Kolkata'; const timeZoneOffset = '+05:30'; meaning you have to change according to your timezone only. This will work maybe.
@hhbounce4 жыл бұрын
@@Budgetbloom06 very nice! it works. Thank you!!!!
@Budgetbloom064 жыл бұрын
@@hhbounce my pleasure #believe in #open-source
@reenadangi14984 жыл бұрын
@@Budgetbloom06 Hey are you able to set an appointment in calendar ?
@Budgetbloom064 жыл бұрын
@@reenadangi1498 Yes this piece of code is properly working
@anikitgrover71665 жыл бұрын
mam I haven't set an appointment scheduled on my google calendar but I will follow all your instructions as you said .. i hope you will help me out ..thanks
@cedricpendji49723 жыл бұрын
I had the same issue, here is what i did to fix it: Below is the code given in the template const timeZone = 'America/Los_Angeles'; const timeZoneOffset = '-07:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('-')[0] + timeZoneOffset)); As we can see, the timezone in the template is 'America/Los_Angeles', But as I live in a different timezone, I changed code accordingly: const timeZone = 'GMT'; const timeZoneOffset = '+02:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('+')[0] + timeZoneOffset)); Remember to select the timeZoneOffset corresponding to your location (mine is +02:00) Check how I replaced the last split in the code from '-' to '+' as offset for me is '+02:00'
@limyiheng89954 жыл бұрын
Hi Team, Thank You for the tutorial. I have a question. How do I modify or delete the appointment created through fulfilment on Dialogflow?
@aprprasanth88034 жыл бұрын
will it add the event to user's calendar without his consent?
@LucianoZambito5 жыл бұрын
On line 81 err ? reject(err) : resolve(event); I get this warning "Excepted an assignment or function call and instead saw an expression". Anybody knows how to fix that? The deploying fails and generates and the webhook goes in timeout :-(
@jamesbrimfield85225 жыл бұрын
I got that to... any help would be appreciated.
@kevinmathews66344 жыл бұрын
I think its becasue the code thats provided here is in node 6 and dialogflow only functions with node 10 at present. Thats what I understood with the minimum knpwledge I have
@SimiBoi1844 жыл бұрын
great nice and interesting videos! but i did not manage to have the appointment created. based from the given diagnostic info, under fulfillment status it says webhook call failed: Error unavailable.
@thepedrorriva3 жыл бұрын
where did you find the diagnostic info?
@samirghoudrani36593 жыл бұрын
same here, I get: Webhook call failed. Error: UNAVAILABLE
@samirghoudrani36593 жыл бұрын
@@thepedrorriva on the right hand side, where you test the bot
@himanshuchuri8944 жыл бұрын
Can any one please help!. this code is giving me an error 14. "message": "Webhook call failed. Error: UNAVAILABLE."
@jessiz42174 жыл бұрын
Have you solved this problem?thx
@thepedrorriva3 жыл бұрын
did you manage to solve the problem?
@thepedrorriva3 жыл бұрын
@@jessiz4217 did you manage to solve the problem?
@antonheeremans23124 жыл бұрын
I get a semicolon error when pasting the calendar ID in index.js. But there are no semicolons in the code
@ilofeudo4 жыл бұрын
Can I schedule appointments on a different calendars?, I have many shops, and each one have its own calendar.
@thepedrorriva3 жыл бұрын
This is a very weird way to book appointments. Usually the business has specific time slots where you want to fill in appointments. In the case described, the user inputs the hour and date of the appointment, instead of the chatbot giving some options or just telling the user the next available spot. Weird, would like to know how to implement in this other way.
@purplegirl80362 жыл бұрын
Yes
@TauvicRitter11 ай бұрын
This video shows the happy path that quickly shows success. Real applications are always much harder.
@andresmur54035 жыл бұрын
Hi, Great Help! Everything works but I need to add the email of the client so he/she can have the invite. Besides, is there any way the agent ask to confirm the date and time available before creating the event? We usually ask for the payment before schedule an appointment.
@aprprasanth88034 жыл бұрын
will it add the event to user's calendar without his consent?
@rithwikreddye4 жыл бұрын
Bro I can help you out with it
@Budgetbloom063 жыл бұрын
@@rithwikreddye I also got stuck in the same. Will you help me out?
@JoshVonhauger4 жыл бұрын
very little of this matches what is in the google cloud platform now does anyone have an up to date how to
@dollydashsaini2844 жыл бұрын
hi.thank you very much for this video.how to add phone numbers and names automatically to the google calendar ?
@MzCastorama4 жыл бұрын
I got no errors, but I get the reponses I put in my intent instead of the one who's written in this code, and my calendar doesn't create the appointement. Any clue how to fix this ?
@shantamsultania42324 жыл бұрын
any improvement you made mate ?
@MzCastorama4 жыл бұрын
@@shantamsultania4232 Actualy yes. The issue was so simple I feel stupid. In the line that split the date...you have to replace the "-" by a "+" if you are in a timezone with a +. "N" GMT...That's the only change you have to make and it works fine.
@TauvicRitter11 ай бұрын
The chatbot does not understand dates in natural language such as tuesday next week. I use Dutch language and support for that is worse. As long as you use English it works better. Also support for knowledge bases is only in English. I have to do my own parsing to get it understand werkdays. AI is far from perfect. But I'm happy it is a reasonable useful application.
@aprprasanth88034 жыл бұрын
will it add the event to user's calendar without his consent?
@rohan54044 жыл бұрын
I'm sorry, there are no slots available for Invalid Date. ACTION Not available PARAMETER VALUE date 2020-03-09T12:00:00+05:30 time 2020-03-08T15:00:00+05:30 how to solve this error
@MzCastorama4 жыл бұрын
Hello. If you change @sys.date to @sys.date-time this error is solved. (Even though it still don't work in my case, got the positive reply but the calendar doesn't create the appointement)
@pvergadia4 жыл бұрын
@@MzCastorama The calendar not creating appointment could be related to the timezone, did you make sure the timezone is accurate?
@Budgetbloom065 жыл бұрын
Great, Thank you i learnt a lot from You (#Deconstructing Chatbots) . It would be very great if you help me solving the error, The error is "Webhook call failed, request timeout error"
@Budgetbloom065 жыл бұрын
I solved this error, and come up with another one. Here is the error: "fulfillmentText": "I'm sorry, there are no slots available for Invalid Date." and try solving it from a while. Do you help me anyhow?
@mannymedina11325 жыл бұрын
@@Budgetbloom06 How did you solve this issue?
@anandnatarajan71143 жыл бұрын
@@Budgetbloom06 I would love to hear that as well - am stuck at this step too
@Budgetbloom063 жыл бұрын
@@anandnatarajan7114 Many pleasure to help you out. You can anytime DM me the doubts at the above mentioned link.
@magebazulu45813 жыл бұрын
@@Budgetbloom06 Hey, how did you resolve the first error? I'm also having the same issue
@prateektrikha85445 жыл бұрын
Thankyou. You're a life saver
@geovilla8215 жыл бұрын
hi i would like to know if you are able to execute without errors
@patrickfred42505 жыл бұрын
I would like Dialogflow to display date of events that are in my calendar, for example the next pay date.
@saurabhkumar-vj6xp3 жыл бұрын
thanks for this great tutorial, appreciate your way of teaching. I tried to do as it is but my calendar does not get the appointment schedule on it. can any body help ?
@cedricpendji49723 жыл бұрын
I had the same issue, here is what i did to fix it: Below is the code given in the template const timeZone = 'America/Los_Angeles'; const timeZoneOffset = '-07:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('-')[0] + timeZoneOffset)); As we can see, the timezone in the template is 'America/Los_Angeles', But as I live in a different timezone, I changed code accordingly: const timeZone = 'GMT'; const timeZoneOffset = '+02:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('+')[0] + timeZoneOffset)); Remember to select the timeZoneOffset corresponding to your location (mine is +02:00) Check how I replaced the last split in the code from '-' to '+' as offset for me is '+02:00'
@itsswabrihere82994 жыл бұрын
i would like to know how to integrate Google maps API when making a local services chart bot
@awefulbrown19095 жыл бұрын
Love the playlist. I'm getting an error on this video when trying to add it to the calendar. first error: `Unhandled rejection`. then error: `Error: No handler for requested intent at WebhookClient.handleRequest (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:317:29) at exports.dialogflowFirebaseFulfillment.functions.https.onRequest (/srv/index.js:83:10) at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:57:9) at /worker/worker.js:783:7 at /worker/worker.js:766:11 at _combinedTickCallback (internal/process/next_tick.js:132:7) at process._tickDomainCallback (internal/process/next_tick.js:219:9)`. I've googled it and haven't found a solution.
@MarkvanderMade_Official4 жыл бұрын
I followed along with all the steps but it seems it does not catch on the fulfillment in the intent itself
@patrickfred42505 жыл бұрын
Hi, The send link is greyed out when I pasted the client email to share with specific people. I select to make changes to events but it still is not active. Please help.
@ezequiasrocha30375 жыл бұрын
You have to add the service agent email to your countacts. That's it Priyanka didn't said.
@patrickfred42505 жыл бұрын
@@ezequiasrocha3037, thank you, it worked.
@mohammedzakiuddin17363 жыл бұрын
Hii Priyanka, I'm getting problem with the deployment...Have used your code from the github, but at the time I click on deploy button, its failing to deploy and displaying message as "Error happend during cloud functions delpoyment" do help me out
@anandnatarajan71143 жыл бұрын
please check on the console log (there is a hyperlink is displayed on the side). Although, it didnt help me in great deal - I learnt that I can add console.log msgs and find out how the code is working. But am still yet to achieve the final goal yet.
@healthyselftoday3 жыл бұрын
I am getting this error: Error happened during Cloud Functions Deployment
@waelbnd35363 жыл бұрын
Is the inline editor free !!?
@ErikoElCurioso5 жыл бұрын
Hi, thanks for the video. I would like to know how to add people to the event from the chat. Can you help me?
@aakashm.24953 жыл бұрын
Hey how to enable text to speech in dialgflow?
@jiami46153 жыл бұрын
error happening when deploying the inline editor... don't know why
@dhirajsobti71493 жыл бұрын
Need your help. When i created service account it didnt gave me a option to download Jason file. Now how do i get it? In Index.js its content has to be copied . Pls advise
@saikiran-zq7bs4 ай бұрын
I am facing the same problem. Did you find the solution?
@jaybrown9265 жыл бұрын
Hi, thanks for this video. But I'm getting this error code "The deployment of your Cloud Function failed: Function failed on loading user code. Error message: package.json file can't be parsed. Please check whether syntax is correct: /srv/package.json: Unexpected end of JSON input" . I tried everything.
@Jonasgamertv5 жыл бұрын
Could you post a link to your json file? Feel free to upload it to pastebin.com, and send it here or into my mail. (jonas.vdr@gmail.com)
@cryptostar14272 жыл бұрын
Very nice !
@mondweepchakravorty99125 жыл бұрын
Hi - I get an error saying "Sorry, we're booked on Invalid Date at Invalid Date. Is there anything else I can do for you?" My calendar settings do say "Make changes to events". I have created a new calendar as suggested, used the new calendar id in the firebase code and also given access onto the calendar to the correct service account. The Chatbot understands 'Today' and "Now" correctly, but the response from the fulfillment engine is as shown in the error above. Would anyone be able to assist?
@cedricpendji49723 жыл бұрын
I had the same issue, here is what i did to fix it: Below is the code given in the template const timeZone = 'America/Los_Angeles'; const timeZoneOffset = '-07:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('-')[0] + timeZoneOffset)); As we can see, the timezone in the template is 'America/Los_Angeles', But as I live in a different timezone, I changed code accordingly: const timeZone = 'GMT'; const timeZoneOffset = '+02:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('+')[0] + timeZoneOffset)); Remember to select the timeZoneOffset corresponding to your location (mine is +02:00) Check how I replaced the last split in the code from '-' to '+' as offset for me is '+02:00'
@hades666net5 жыл бұрын
Like this, but how I integred with firebase?
@nathanbendavid50504 жыл бұрын
I have an issue once in Fulfillment --inline editor (Once I enable the Inline Editor, it give me a meaage saying Billing Required. Even though my billing is connected. Anybody got an answer?
@akaamzain66543 жыл бұрын
please let me know if you found the solution for this
@yichen84004 жыл бұрын
I would like to know how to collect the user phone number and add it to the google calendar appointment.
@messamuddinahmed83074 жыл бұрын
There's an error at 99 line that I'm unable to resolve, please help me.
@russellcampbell34634 жыл бұрын
I received the same error. Did you get it to work?
@aditivaishampayan97814 жыл бұрын
I am getting same error, any workaround?
@messamuddinahmed83074 жыл бұрын
@@aditivaishampayan9781 still didn't have it figured out
@messamuddinahmed83074 жыл бұрын
@@russellcampbell3463 no
@markusnyblom44914 жыл бұрын
Thanks for awesome videos! However, at line 99 I'm gettting: "err ? reject(err) : resolve(event); I am getting an error " Expected an assignment or function call and instead saw an expression" anyone able to solve this? Thank you for your time!
@momsmobileoilchange3 жыл бұрын
did you resolve ? im getting same issue
@torbeneriksen66094 жыл бұрын
Hi, I got confirmation that the appointment is created but I don't see the entry in the calendar. Does anyone have the solution for that?
@pvergadia4 жыл бұрын
Make sure your service account details are accurate to add an entry in calendar.
@cedricpendji49723 жыл бұрын
I had the same issue, here is what i did to fix it: Below is the code given in the template const timeZone = 'America/Los_Angeles'; const timeZoneOffset = '-07:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('-')[0] + timeZoneOffset)); As we can see, the timezone in the template is 'America/Los_Angeles', But as I live in a different timezone, I changed code accordingly: const timeZone = 'GMT'; const timeZoneOffset = '+02:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('+')[0] + timeZoneOffset)); Remember to select the timeZoneOffset corresponding to your location (mine is +02:00) Check how I replaced the last split in the code from '-' to '+' as offset for me is '+02:00'
@chweyaann62935 жыл бұрын
Thank you. God bless you
@monottone99393 жыл бұрын
How to Single question but Dialogflow schedule answer form Google Calendar Example 1 : user send on Every day and Every time user : Are You Ready? Chatbot : I'm Ready. (Default) Example 2 : user send on 30/03/2021@11.00am user : Are You Ready? Chatbot : I'm Close 11.00am - 05.00pm (Google Calendar)
@superstark85435 жыл бұрын
Thanks. Can you also tell about how to work java script with dialogflow please.
Check out my reply in above discussion with @Ifeanyi Ndukwe you'll get the solution
@iankafuna39275 жыл бұрын
I followed the steps several times still it doesn't work
@daisy23775 жыл бұрын
Hi Ian Kafuna, I made several changes on my code and now it finally works !! You may need to update the version of the dependencies in the file "package.json"... like this: "dependencies": { "firebase-functions": "3.3.0", "firebase-admin": "^8.8.0", "actions-on-google": "2.12.0", "googleapis": "^45.0.0", "google-auth-library": "^5.5.1", "dialogflow-fulfillment": "0.6.1" }... Please, let me know if it also works for you ;)
@izuchukwuafunugo20855 жыл бұрын
daisy 237 Please it doesn't work for me. How can you help? Please
@daisy23775 жыл бұрын
@@izuchukwuafunugo2085 Hey ! do you know what the error is? i mean, when you run the function, what the "firebase console" tells you ?
@izuchukwuafunugo20855 жыл бұрын
daisy 237 It just write Error.. Errorid and some numbers
@daisy23775 жыл бұрын
@@izuchukwuafunugo2085 Sorry, i ve never got this error ! :(
@vaisakhm71664 жыл бұрын
i got an error Webhook call failed. Error: UNAVAILABLE.
@simrankataria59904 жыл бұрын
same. did u resolve it ?
@thepedrorriva3 жыл бұрын
@@simrankataria5990 did you manage to solve the problem?
@thepedrorriva3 жыл бұрын
did you manage to solve the problem?
@b3rakesh115 жыл бұрын
Thank you
@gimelledelapena93553 жыл бұрын
not working
@thepedrorriva3 жыл бұрын
Nothing works in this tutorial
@arjunrajendran51084 жыл бұрын
@Google Cloud Platform Hi GCP Team! I would like to know about the cloud functions with if/else command. that checks the user response as an input. Use Case: Currently, I am engaged in a feedback application that expects a yes/no reply for each question from the user. So based upon the reply such as yes/no for each question, It would suggest the user contact the support team if the user's NO response count was higher than the YES response count. Help me out to do build this logic up!.. :
@b3rakesh115 жыл бұрын
Awesome
@georgea.mchileya42075 жыл бұрын
is anyone getting the Invalid date error
@hemalathasangani70585 жыл бұрын
I am getting
@successmyanmaraudio59085 жыл бұрын
thanks
@yonomas844 жыл бұрын
most people here said they have errors... and i don't see any support from you guys, it seems that what you showed us, require more than just a video, could you provide more guidance in future lessons, otherwise it will be something to show, but not to learn
@Budgetbloom064 жыл бұрын
How do I add appointment type?
@b-rytte4 жыл бұрын
It is a developer entity and not a system entity, so u have to create the entity yourself and map the events to it
@Budgetbloom064 жыл бұрын
@@b-rytte Actually, I'm facing a problem: Whenever two clients try to book appointments with two different person at same time. It's not getting fixed. Meaning that, if i book appointment with Director at 2am today and you book same appointment with account manager at same time and date. The appointment is not getting fixed and showing there's no slot at the give time and date.
@Budgetbloom063 жыл бұрын
Hey @@b-rytte ! Can you fix my doubt?
@mattsteffler44275 жыл бұрын
It does not work, I have gone over this video and double and triple checked everything. It gives the message that the appointment is set but does not update the calendar. No errors or anything.
@mattsteffler44275 жыл бұрын
When i check the diagnostic it says: Webhook call failed. Error: Request timeout.
@Sercanepazzo5 жыл бұрын
@@mattsteffler4427 me too...
@Miguelfutbol105 жыл бұрын
@@mattsteffler4427 Do you found the solution? thanks
@BrandonSteve1406935 жыл бұрын
I have the same error: Webhook call failed. Error: Request timeout.
@hophoptv94015 жыл бұрын
did you find the solution ? i have the same problem
@bunhthachau35873 жыл бұрын
Hi
@JoshVonhauger4 жыл бұрын
has anyone gotten these instructions to work ?
@batthis3 жыл бұрын
No, it ends with a crash according to logs
@latheep4 жыл бұрын
It does not work, I have gone over this video and double-checked everything. It gives the message that the appointment is set but does not update the google calendar. No errors or anything.
@cedricpendji49723 жыл бұрын
I had the same issue, here is what i did to fix it: Below is the code given in the template const timeZone = 'America/Los_Angeles'; const timeZoneOffset = '-07:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('-')[0] + timeZoneOffset)); As we can see, the timezone in the template is 'America/Los_Angeles', But as I live in a different timezone, I changed code accordingly: const timeZone = 'GMT'; const timeZoneOffset = '+02:00'; const dateTimeStart = new Date(Date.parse(agent.parameters.date.split('T')[0] + 'T' + agent.parameters.time.split('T')[1].split('+')[0] + timeZoneOffset)); Remember to select the timeZoneOffset corresponding to your location (mine is +02:00) Check how I replaced the last split in the code from '-' to '+' as offset for me is '+02:00'