Powered by
TypeError: Cannot read properties of undefined (re...
# 🤝help
e
early-thailand-84579
04/21/2025, 7:41 PM
Hi y'all. I'm getting this error after picking a listed time with a single choice card. "Error executing card "card:capture" in flow:Main:node:showSelectSlots - TypeError: Cannot read properties of undefined (reading 'trim')" context: bot makes an Calendly API call to check available time slots for specific date. Output is in ISO format, but I'm formatting the strings into HH:MM AM/PM for better readability within the dropdown. When I choose any time in the dropdown, I get this error. Variable "selectedTimeFormatted" is filling out tho. I'm trying to get the time so I can make another API call to actually schedule the meeting. Please help a noob bot builder 🙏 Thanks!
https://cdn.discordapp.com/attachments/1363962866826215545/1363962867174608926/image.png?ex=6807f0e8&is=68069f68&hm=7769c76136abdee81dab568f6524583a125ac575dcf785ba870c468b48390c59&
https://cdn.discordapp.com/attachments/1363962866826215545/1363962867635851294/image.png?ex=6807f0e8&is=68069f68&hm=852d5bf77eec607a60c7a18997a14b37f73085a2e77a17d6ea30cc0fb4bf0d63&
n
narrow-mechanic-36812
05/15/2025, 8:12 PM
Hi
@early-thailand-84579
Just had the same issue I used schema for choices with properties title and value and got this error changed it to label and value and it worked don't know if that's your issue I do exactly the same thing you described
e
early-thailand-84579
05/16/2025, 7:34 PM
Hi
@narrow-mechanic-36812
Thanks for reaching out. I think yes, that was the same issue I had. I did change the JS to return label on dropdown but to "save" the actual value upon selection, which is an datetime string ISO format, just what I needed to send to the actual reservation API call.
https://cdn.discordapp.com/attachments/1363962866826215545/1373020800696717403/image.png?ex=6828e4c4&is=68279344&hm=3c50fefd60bfd7160ccc1e5c9d2a2907686b7484c91808281f019d8dc3cfc6e0&
Previous
Next