Automation Rules
Automation Rules let you go beyond the 15 built-in Guest Journey steps and create your own custom email automations. While the Guest Journey covers the standard booking lifecycle, custom rules give you full control to send emails based on specific triggers, filtered by listing or booking source, and timed to the exact moment you need.
Use custom automations for scenarios the Guest Journey does not cover -- for example, sending a parking instruction email 2 days before check-in only for your city-center apartment, or a late-checkout offer on the morning of departure only for direct bookings.
Understanding triggers
Every automation rule starts with a trigger: the event or schedule that determines when the email is sent. hejGuide supports two categories of triggers.
Event-driven triggers (immediate)
These triggers fire within seconds of the event occurring in hejGuide. There is no configurable delay -- the email is queued and sent as soon as the event is recorded.
| Trigger | Internal name | When it fires |
|---|---|---|
| Booking created | booking_created | A new booking is added (manual, iCal import, or Channel Manager) |
| Booking cancelled | booking_cancelled | An existing booking is cancelled |
| Payment request sent | payment_request | A payment request is generated for a booking |
| Payment received | payment_received | A payment is recorded (Mollie, Stripe, or manual entry) |
| Check-in completed | checkin_completed | A guest submits the online check-in form |
Event-driven triggers are processed in real time. When a guest completes their online check-in at 22:47, the email is sent at 22:47 -- not at the next scheduled cron run.
Scheduled triggers (cron-based)
These triggers are evaluated by a background job that runs every 15 minutes. They allow you to specify a number of days before or after a booking event, plus a target send time.
| Trigger | Internal name | Relative to | Configurable |
|---|---|---|---|
| Before check-in | checkin_invite | Check-in date | Days before + time of day |
| Check-in reminder | checkin_reminder | Check-in date | Days before + time of day |
| After check-in | days_after_checkin | Check-in date | Days after + time of day |
| On checkout day | checkout_day | Checkout date | Time of day |
| After checkout | days_after_checkout | Checkout date | Days after + time of day |
| Remaining payment due | payment_rest_due | Check-in date | Days before + time of day |
When configuring a scheduled trigger, you set two parameters:
- Offset -- how many days before or after the anchor event (e.g., "3 days before check-in" or "2 days after checkout").
- Send time -- the time of day the email should go out (e.g., 10:00). The cron evaluates every 15 minutes, so the actual send time will be within 15 minutes of the target.
TIP
Scheduled triggers are ideal for pre-arrival information (directions, local tips), checkout reminders, and post-stay follow-ups. Pair them with listing-specific filters to send different content for different properties.
Creating a custom automation rule
Go to Automated Emails in the sidebar.
Navigate to the Automations tab.
Click Create Automation.
Configure the rule:
a. Choose a trigger -- Select from the event-driven or scheduled triggers listed above. For scheduled triggers, set the day offset and send time.
b. Select a template -- Pick an existing email template from the dropdown, or click Create Template to build a new one. The template will use Template Variables to personalize the content.
c. Add filters (optional) -- Narrow down which bookings trigger this automation:
- Filter by listing -- Only send for bookings at one or more specific listings. Leave empty to apply to all listings.
- Filter by booking source -- Only send for bookings from a specific channel (Direct, Airbnb, Booking.com, etc.). Leave empty to apply to all sources.
Click Save.
The automation is created in an enabled state and will start evaluating immediately for new bookings (event-driven) or at the next cron run (scheduled).
Example: City apartment parking instructions
To send parking instructions 2 days before check-in, only for your city apartment:
- Trigger: Before check-in, offset 2 days, send time 10:00.
- Template: Select your "Parking & Arrival Instructions" template.
- Filter by listing: Select "City Center Apartment".
- Filter by booking source: Leave empty (all sources).
- Save.
Example: Direct-booking-only loyalty offer
To send a return-visit discount 5 days after checkout, only for direct bookings:
- Trigger: After checkout, offset 5 days, send time 10:00.
- Template: Select your "Thank You + Discount Code" template.
- Filter by listing: Leave empty (all listings).
- Filter by booking source: Select "Direct".
- Save.
Guest Journey steps vs. custom rules
The 15 built-in Guest Journey steps and custom automation rules share the same underlying engine, but there are key differences:
| Guest Journey steps | Custom automation rules | |
|---|---|---|
| Configuration | Pre-defined trigger and purpose; you assign a template and toggle on/off | Fully configurable trigger, template, and filters |
| OTA skip logic | Booking and payment steps are automatically skipped for Channel Manager bookings | No automatic skipping -- you must add source filters yourself |
| Number | Fixed at 15 | Unlimited |
| Use case | Standard booking lifecycle communication | Specialized, listing-specific, or source-specific scenarios |
You can use both simultaneously. For example, keep the Guest Journey's "Booking Confirmation" enabled for all bookings, and add a custom rule that sends a "Welcome to Stockholm" email 3 days before check-in only for your Stockholm listings.
Channel Manager (OTA) bookings and custom rules
This is one of the most important concepts to understand when creating custom automations.
The built-in Guest Journey steps have automatic OTA skip logic: booking confirmations and all payment-related emails are automatically suppressed for bookings that arrive through the Channel Manager (Booking.com, Airbnb, etc.), because the OTA already handles that communication.
Custom automation rules do NOT have this automatic skip logic. If you create a custom rule with a booking_created trigger, it will fire for every booking -- including OTA bookings -- unless you explicitly filter it.
The following triggers are the most important to filter when you want to exclude OTA bookings:
booking_created-- The OTA has already confirmed the booking.payment_request-- The OTA collects payment.payment_received-- The OTA confirms payment.payment_rest_due-- The OTA manages the balance.
WARNING
Always add a booking source filter to custom automations that involve booking confirmation or payment communication. Without this filter, OTA guests will receive duplicate or confusing emails -- one from the OTA and one from your automation. Use "Direct" as the source filter to restrict these automations to direct bookings only.
Check-in, during-stay, and post-checkout triggers are generally safe to run for all booking sources, since the OTA does not send property-specific arrival instructions or mid-stay check-ups on your behalf.
Enabling and disabling rules
Each automation rule has an enable/disable toggle. When you disable a rule:
- No new emails will be queued for future bookings.
- Emails already in the queue for existing bookings will still be sent at their scheduled time.
To cancel queued emails for a disabled rule, go to Queue & Log and cancel them individually or in bulk.
To re-enable a rule, turn the toggle back on. It will start evaluating for new triggers immediately.
How the scheduling engine works
Understanding the scheduling engine helps you predict exactly when emails will be sent.
Event-driven processing: When an event occurs (booking created, payment received, check-in completed), hejGuide immediately evaluates all enabled automations with a matching trigger. If the automation's filters pass (correct listing, correct booking source), the email is queued and sent within seconds.
Scheduled processing: A cron job runs every 15 minutes and evaluates all enabled automations with scheduled triggers. For each active booking, it checks whether the configured offset and send time have been reached. If so, it queues the email for immediate sending.
The 15-minute cron interval means:
- An email scheduled for 10:00 may actually send between 10:00 and 10:14.
- There is no risk of duplicate sends -- the engine tracks which automation/booking combinations have already been processed.
Processing order: If multiple automations are triggered by the same event (e.g., two rules both trigger on booking_created), they are processed in the order they were created. All matching rules will fire -- they do not cancel each other out.
Practical tips
- Start with the Guest Journey. Enable the built-in steps first, then add custom rules for specific needs. The Guest Journey covers 90% of standard communication.
- One rule, one purpose. Keep each automation focused on a single message. This makes it easier to enable, disable, and troubleshoot individual communications.
- Test with a test booking. Create a test booking to verify that your automation fires correctly with the right template, variables, and timing. Check the Queue & Log to confirm the email was queued.
- Review your automations quarterly. As your listings and workflow change, some automations may become outdated. Disable or update them to keep your guest communication current.
TIP
You can see every email that has been queued, sent, or failed in the Queue & Log. Use it to verify that your automations are working as expected, and to resend any emails that failed due to temporary issues.
Related
- Automated Emails Overview -- Introduction to the Automated Emails module
- Guest Journey -- The 15 built-in automation steps
- Creating Templates -- Build the templates used in automations
- Template Variables -- Personalization variables available in templates
- Queue & Log -- Monitor, cancel, and resend scheduled emails
- OTA Messages -- How direct messaging works for Channel Manager bookings