https://discord.gg/botpress logo
Error when invoking the scheduleAppointment functi...
# 🤝help
b
I created an agent in Botpress using my knowledge base attached in a PDF and the two functions scheduleAppointment and checkCalAvailability written in JS. The chatbot performs initial functions easily without any errors however, it is unable to schedule appointments entirely. The agent first invokes the checkAvailability function, which successfully checks the availability for the appointment but then, as soon as the scheduleAppointment function gets called, the problem emerges. The error code is below: Tool global.scheduleCalComAppointment failed { type: 'tool_call', tool_call_id: 'tcall_01KJ5WYYHZRG4H7SPBAM53HJ4C', started_at: 1771872156223, ended_at: 1771872157227, tool_name: 'scheduleCalComAppointment', object: undefined, input: { date: '2024-03-04', time: '15:00', name: 'Cyrus Bilpodiwala', email: 'cyrus.bilpodiwala@gmail.com' }, output: undefined, error: [Error: Failed to schedule appointment: Request failed with status code 400 success: false } I have tried everything to fix this issue but to no avail. I performed a manual inspection of my function and my function's logic seems correct to me. I have linked the calendar using the /v2/bookings endpoint since the calendar is Cal.com and even passed the correct headers and parameters. I can't fix this issue. Please advise.
l
It could be something on the side of Cal.com!
Can you try again with the google calendar integration instead?
b
I will give it a try. Is it alright if I get back to you in a bit?
l
of course @best-jelly-81707
if you need help getting started with google calendar watch this
b
I am having trouble integrating the Google Calendar into my AI bot. I noted that the Google Calendar ID was my email address whereas in the video, I saw a cryptographic key was used as an ID.
I enabled the Google Calendar API through Google Cloud Console and created a service account over there. When I added theservice account information into BotPress's Google Calendar config page, it still failed to generate the dates of availability. The error points to the execution of an integration action. I even tried verifying through the use of a service account but the problem still persists
The error message is as follows: Error while executing integration action: State "oAuthConfig" doesn't exist for integration "intver_01KCPW0RPJR7X6ATK55RP460VZ". The action error will be ignored since you are running in the Studio.
w
Hey @best-jelly-81707 did you set up Google Calendar using OAuth or Manual Config?
b
I tried setting up Google Calendar using both methods
Error while executing integration action: State "oAuthConfig" doesn't exist for integration "intver_01KCPW0RPJR7X6ATK55RP460VZ". The action error will be ignored since you are running in the Studio. {"scope":"dm"}
method*
w
OAuth might not be working. Have you tried Manual Configuration? What does your Configuration page look like?
w
Have u tried using a different calendar and see if it has the same error? It could be how you're configuring the connection
b
No I have not tried using a different calendar
w
Try it out and let us know if it still gives you the same error!
b
I switched to a different calendar and noticed that the ID is the email under which the Google account is registered. Is that expected to happen?
w
b
I do not know how, but still the ID is in email format
w
Yes, it is your email because thats your main calendar. Have you tried creating a new one specific for your bot and using that calendar instead?
b
I am unsure how to do that
w
no worries! In the video tutorial around the 10:15 mark I show how to create one:

https://youtu.be/51yT9NTde68?si=-u8yp7DnI5eiPNCp&t=615▾

b
I cannot find a way to create a calendar using a botpress email
w
these are also the steps to create a calendar: https://support.google.com/calendar/answer/37095?hl=en
b
Can I get back on this particular issue? I haven’t completely resolved it
w
Yup! Just let us know what issues you face
l
Last we spoke you were still setting up the integration, have you completed that?
b
Yeah I’m still experiencing the same issue. The Google Calendar integration problem hasn’t resolved
l
Try with a different email @best-jelly-81707 there's no issue with the integration
c
Is there a way to do OAuth with code card instead?
w
Hi! Yes you can configure the Google Calendar integration with oAuth if that is what you're asking
c
I am trying to create a folder in google drive.. the integration doesn't allow folder creation.. so I am using code node and trying to do it with API call but it doesn't let me use axios or other node packages.. so I need some code for OAuth API call
w
can you make another #1111009377525186570 thread for this?
c
6 Views