Advanced Options with Zapier

Zapier can execute Python and JavaScript code to process data incoming from Nexudus and let you trigger actions based on the results of that processing. This example sends a message alert by email when a booking is placed and that booking is longer than two hours.

There is a free version of Zapier that lets you set up some Zaps. You can look at the different price plans on the following link: https://zapier.com/app/settings/billing/plan/41

  1. Hook to the New Booking notification from Nexudus.

  2. Calculate the duration of the booking in Zapier.

    This is the code in this step. Remember to create the two variables "fromTime" and "toTime" in the top part of this section.

    var ms = new Date(input.toTime).getTime() - new Date(input.fromTime).getTime();
    return { duration: ms / 60000 };
  3. Do a condition step to execute the Zap only if the booking is 120 minutes long or more.

  4. Send an email with the notification you want to issue.

Last updated

Was this helpful?