I’m using the HTML/JS scheduler UI and I need to capture details about the meeting once it is scheduled/confirmed so I can POST that back to my own API. I can’t use Webhooks because they don’t provide enough context to associate things properly on my back-end
The problem I’m facing is that there is no eventOverride event that fires after the “https://api.us.nylas.com/v3/scheduling/bookings?conf…” POST returns and the nylas-booked-event-card is loaded with the confirmed event details. The docs imply the detailsConfirmed event would be it, but it clearly fires before the POST does. Oh, and the other problem I’m facing is that I’m bad at front-end development.
I’ve been all through the docs, tried all the events, cleared my cookies, tried turning it off and then turning it back on again. All with no luck.
Is the detailsConfirmed event firing at the wrong time or is there just no event that does what I need? I’m resorting to a setTimeout that will hopefully wait long enough that the POST completes and the nylas-booked-event-card is populated. But that’s an awful “solution.” Here’s my code:
Can you please be more specific about how Nylas supports what I’m trying to do?
I’m asking for something specific like, “use the eventOverride for this specific event”. So far, none of my experiments with any of the eventOverrides indicates there is an event that fires after the successful POST to https://api.us.nylas.com/v3/scheduling/bookings?.... I can’t do what I need to do until I’m sure that POST succeeded.
Your previous post said “We have added a new event that gets emitted on a successful response from the API” but you didn’t say what the event is named. Can you please tell me what that undocumented event is named? I can’t find anything that looks right when I’m digging through the JS and I’ve burned a ton of time looking.
But then your last post pointed me to the eventOverride section of the docs? Should I use the new event you mentioned or do I need to work around the lack of an event by overriding the bookingFormSubmitted event, make the POST myself using the connector, check for success and then actually do the thing I need to do?
Adding on to this, the eventOverrides for “bookedEventInfo” currently doesn’t not provide the information added to the booking form i.e Name and email address in my case. Is it possible to fetch the fields that the end user input during the booking process?
I delete my previous post showing working code because I just realized it double-books everything. I wish I had just opened another support ticket 3 weeks ago.