Automatically notify leads about earlier available booking times

Modified on Wed, 6 May at 6:59 AM

Automatically notify leads about earlier available booking times

Fill calendar gaps by automatically notifying leads when an earlier booking slot opens up before their scheduled appointment — they receive an email with a link to rebook if they want.

TL;DR

3-component workflow: (1) Automation — triggers N days before event start, condition checks hh-booking.available-dates within next X days, action sends email if slots found. (2) Email template — notifies lead + includes rebooking link via @bookingFormUrlLead[form-name]. (3) Rebooking booking form — description checks availability again, shows appropriate message if slot already taken. Use available-dates (not optimal-datetime-slots) for maximum rebooking opportunities.

Get started in 3 steps

1

Set up the automation

Trigger: Date/time trigger on Event start date, offset -14 days (adjust to your typical lead time). Condition: @if(<hh-data.count><hh-booking.available-dates latest-date="+10days" booking-form="YOUR_FORM_ID" full-address="%lead_full_address%" /></hh-data.count> > 1){1}@else{0}@endif — returns 1 if earlier slots exist within the next 10 days. Action (if 1): Send email notification. Replace YOUR_FORM_ID with the actual booking form ID.

2

Create the notification email

Write an email template that: (1) Explains earlier times are available, (2) Shows their current appointment time (%event_datetime%), (3) Includes a rebooking button: <a href="@bookingFormUrlLead[YOUR_REBOOK_FORM_NAME]">View earlier times</a>, (4) Reassures them they don't need to act if they prefer to keep their current appointment.

3

Configure the rebooking form

In the booking form description, add conditional logic that re-checks availability when the lead opens the form: if no earlier slots exist anymore (slot was taken between sending email and clicking link), show a polite message. If slots still exist, show the normal booking calendar. Hide the address input (use the lead's existing address). Set latest_date to one day before their current appointment so they can't accidentally book later than they have now.

Read more — full copy-paste templates

Step 1 — Automation condition (copy as-is, replace form ID)

@if(<hh-data.count><hh-booking.available-dates latest-date="+10days" booking-form="YOUR_BOOKING_FORM_ID" full-address="%lead_full_address%" /></hh-data.count> > 1){1}@else{0}@endif

Replace YOUR_BOOKING_FORM_ID with your booking form's ID (find in Campaign → Settings → Booking forms). Returns 1 if any slots are available within 10 days, 0 otherwise. Trigger automation action when result = 1.

Step 2 — Email template (paste into email HTML editor)

Replace YOUR_REBOOK_FORM_NAME with your rebooking form's API name, and update the contact details:

<style>
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; }
.email-container { max-width: 600px; margin: 0 auto; background: white; }
.header { background: #ffffff; color: #333; padding: 40px 30px 25px; border-bottom: 1px solid #f0f0f0; }
.header h1 { font-size: 28px; margin: 0 0 12px 0; font-weight: 300; }
.content { padding: 35px 30px; }
.rebook-button { display: inline-block; background: %brand_color%; color: white; padding: 12px 24px; border-radius: 6px; text-decoration: none; font-size: 14px; }
.info-box { background: #fafafa; border-radius: 6px; margin: 25px 0; padding: 20px 25px; }
.info-row { display: flex; padding: 6px 0; }
.info-label { font-weight: 400; width: 80px; font-size: 14px; }
.info-value { color: #666; font-size: 14px; }
.two-col { display: flex; gap: 4%; margin: 25px 0; }
.col { flex: 1; background: #fafafa; border-radius: 6px; padding: 18px; }
@media only screen and (max-width: 600px) { .two-col { flex-direction: column !important; } }
</style>

<div class="email-container">
  <div class="header">
    <h1>Good news about your booking!</h1>
    <p>Earlier times are available than your current appointment.</p>
  </div>
  <div class="content">
    <p>Hi %lead_name%,</p>
    <p>We have available times in the coming days. Instead of waiting for your appointment on <strong>%event_datetime%</strong>, you can book an earlier time if you'd like.</p>
    <div style="text-align:center; margin: 30px 0;">
      <a href="@bookingFormUrlLead[YOUR_REBOOK_FORM_NAME]" class="rebook-button">View Earlier Times</a>
    </div>
    <div class="info-box">
      <h3 style="margin:0 0 16px 0;">Your Information</h3>
      <div class="info-row"><span class="info-label">Name:</span><span class="info-value">%lead_name%</span></div>
      <div class="info-row"><span class="info-label">Phone:</span><span class="info-value">%lead_phone%</span></div>
      <div class="info-row"><span class="info-label">Email:</span><span class="info-value">%lead_email%</span></div>
    </div>
    <div class="two-col">
      <div class="col"><h4 style="margin:0 0 8px 0;">Current Appointment</h4><p style="margin:0; color:#666;">%event_datetime%</p></div>
      <div class="col"><h4 style="margin:0 0 8px 0;">Location</h4><p style="margin:0; color:#666;">%event_location%</p></div>
    </div>
    <p style="color:#666;">If you prefer to keep your current appointment, you don't need to do anything.</p>
    <p style="font-size:13px; color:#999;">Questions? Contact us at YOUR_PHONE or YOUR_EMAIL.</p>
  </div>
</div>

Step 3 — Booking form description (paste into the form's Description field)

Replace service-field-api-name with your service field slug, and YOUR_BOOKING_FORM_ID with your form ID. Sets latest_date to one day before the lead's existing appointment so they can only book earlier:

<style>.full-address-input-div {display:none;}</style>

<div style="display:none;">
  @input[service-field-api-name; id="selectedProducts"]
  <input type="hidden" id="duration-input" name="duration" value="35">
</div>

<input name='latest_date' value='<hh-date.format input="%event_start_datetime_db% -1day" output="Y-m-d" />' type='hidden' />

@if(<hh-data.count><hh-booking.available-dates latest-date="+10days" booking-form="YOUR_BOOKING_FORM_ID" full-address="%lead_full_address%" /></hh-data.count> > 1){
  <p>Earlier times are available — select a new time below.</p>
}@else{
  <div style="background:#fff4ce; padding:16px; border-radius:8px; border-left:4px solid #f4b400;">
    <p style="margin:0;"><strong>No earlier times currently available.</strong> Your appointment remains on <strong>%event_datetime%</strong>. We'll contact you if earlier times open up.</p>
  </div>
}@endif

Common searches

earlier booking notification • fill calendar gaps • rebooking • available dates automation • calendar optimization • move appointment forward

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article