https://discord.gg/botpress logo
Google Calendar issue
# 🌎general
a
Hi everyone, 👋 I am finalizing a Booking Bot and I'm facing a critical issue with the Google Calendar Integration to prevent double-booking. The Context: I am targeting a Secondary Calendar (not the user's primary email). I have successfully retrieved the specific Calendar ID from Google Settings (format: xyz...@group.calendar.google.com). The Issue: When the user requests a specific date/time, I run a "List Events" card to check availability. Even when I have a confirmed event at that specific time in the calendar, the bot returns 0 events (empty list). As a result, my availability check logic fails, and the bot allows double-booking.
l
Well continue over here!
a
can i share my template ?
I'm finishing up a bot on Botpress and I'm stuck on a tricky Google Calendar issue. I thought you might know a workaround. Basically, I'm trying to check availability on a Secondary Calendar (not the main one). I have the correct Calendar ID, but the native "List Events" card keeps returning 0 events, even though there are slots booked. Do you happen to have a quick code snippet (JavaScript) to force the bot to fetch events from a specific Calendar ID directly? The native integration seems to be struggling with it. Thanks a lot for your help!
l
Yes go ahead!
Both calendars are under the same google account correct?
a
Yes, exactly. It's a secondary calendar created within the same Google account (same login email). Also, I have shared this specific calendar with the Service Account email (the one from the JSON file) in the settings, with ‘Make changes’ permission.
l
does "list events" work as intended on the first calendar?
Can you show me the List events card input field?
Here is the screenshot of the List Events configuration. 📸 To answer your first question: I haven't tested it on the primary calendar recently because I strictly need it to work on this specific secondary calendar (027a...). Important detail: This secondary calendar belongs to the same Google Account, and I have shared it with the Service Account email (from the JSON key) with 'Make changes to events' permissions. Let me know if you spot anything wrong in the config!
l
I dmd you!
Can you send me a link to the. calendar as well?