Skip to main content
You’ll combine hooks and messaging to automate a booking flow.
1

Collections

bookings with fields: room (Select), starts_at (DateTime, required, timezone_required), customer_name (Text), customer_email (Text, format email), status (Select: pending, confirmed, cancelled).
2

Email channel and template

Create an SMTP channel and a template named Booking confirmed:
3

beforeInsert: block double bookings

4

afterInsert: send the confirmation

5

Test

Create two bookings for the same room and time. The second must fail with “This time slot is already booked”. Check the hook’s executions and your inbox.