https://discord.gg/botpress logo
Hi everyone, I've integrated calendly as mentioned...
# 💻developers
f
Hi everyone, I've integrated calendly as mentioned in this tutorial https://discord.com/channels/1108396290624213082/1159200976989855764 and https://discord.com/channels/1108396290624213082/1199029983100813322 @fresh-fireman-491 would appreciate your help here - is it possible when the event scheduling is completed, our client code can detect this and get the bot to send a message along the lines of "Your event has been scheduled" I've tried doing this function isCalendlyEvent(e) { return e.origin === "https://calendly.com" && e.data.event && e.data.event.indexOf("calendly.") === 0; }; window.addEventListener("message", function(e) { if(isCalendlyEvent(e)) { /* Example to get the name of the event */ console.log("event full:",e); console.log("Event name:", e.data.event); if(e.data.event == 'calendly.event_scheduled'){ window.botpressWebChat.sendEvent({type:'trigger',payload :{type:'CALENDLY_EVENT_BOOKED'}}) } /* Example to get the payload of the event */ console.log("Event details:", e.data.payload); } }); and built a custom trigger that detects this event. But seems like the message in my Text box just isn't ending up on my chatbot window. https://cdn.discordapp.com/attachments/1121494527727902891/1250424965723848798/image.png?ex=666ae47f&is=666992ff&hm=b9589672a9c0efd2efc7e37477136e704c7851c8580a580d71140c073effd727&
3 Views