> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minimo.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Reminders before a date

> Send a message N hours or days before (or after) a date of the contact: events, appointments, bookings, renewals, expiries.

## Overview

A reminder before a date is a normal automation, no custom code needed:

1. a **trigger** that fires when the contact gets the date (a registration, a booking, a field update),
2. a **wait until a moment relative to a date field** of the contact ("6 hours before", "1 day before", "3 days after"),
3. the **message**.

Chain more waits and messages for more reminders, for example 6 hours and 1 hour before an event.

The date is read from a contact field when the wait starts. It can be a regular field (`appointment_at`, `trial_ends_at`) or a [dynamic field](https://docs.minimo.it/product/data-sync/dynamic-fields.md) computed from your connected database, such as the start of the next tournament a player registered to.

## Example: tournament reminders (6 hours and 1 hour before)

A tournament app stores tournaments in `tornei` (with the start time in `tornei.inizio`) and registrations in `tornei_iscritti` (`utente_id`, `compagno_id`). The goal: every registered player gets a reminder 6 hours before the start and another one 1 hour before.

**1. Give each player the date**

Create a dynamic field with **Ask Mo**:

> Create a dynamic field NEXT\_TOURNAMENT\_START (datetime): for each contact, the minimum of `tornei.inizio` across the tournaments in `tornei_iscritti` where the person is `utente_id` or `compagno_id`, with a start date in the future.

The field is filled for every player right away and recomputed when a registration is added or changes.

**2. Build the automation**

Describe it to Mo (or to Claude through the Minimo MCP):

> When NEXT\_TOURNAMENT\_START is updated, wait until 6 hours before NEXT\_TOURNAMENT\_START and send a reminder email, then wait until 1 hour before and send a last-call email.

Mo creates it as a draft:

* **Trigger:** Field updated, `NEXT_TOURNAMENT_START`, starts **every time (latest run only)** (see [When the date changes](#when-the-date-changes))
* **Wait:** until 6 hours before `NEXT_TOURNAMENT_START`, skip the next step if the moment has passed
* **Email:** "The tournament starts in 6 hours"
* **Wait:** until 1 hour before `NEXT_TOURNAMENT_START`, skip the next step if the moment has passed
* **Email:** "Last call: the tournament starts in 1 hour"

**3. Make the reminders service emails**

A reminder for a tournament the player signed up to is a service email: set both emails to **Utility** (the category pill on each email step, or ask Mo or Claude). Automation emails start as **Marketing**, and a marketing email is not sent to contacts without marketing consent. See [Service emails](#service-emails-reach-every-registered-player).

**4. Review and activate**

Open the draft in the builder, check the copy and activate it. If your app already sends these reminders from code, turn that code path off when the automation goes live, so players don't get them twice.

## Build it by hand

In the builder add a **Delay** step and choose **Based on a contact date**:

* **Contact date field:** any field of type date or datetime (fields synced from your database included).
* **When:** *Before*, *After* or *On the exact date*, with an offset in minutes, hours or days.
* **Skip the next step if this moment has already passed:** see below.

## Late registrations

If someone registers 3 hours before the start, "6 hours before" is already in the past.

* With **Skip the next step if this moment has already passed** on, the wait does not hold the contact and the step right after it (the 6-hour reminder) is skipped. The flow goes on, so the 1-hour reminder still goes out on time.
* With it off, the wait ends immediately and the next step runs right away (the 6-hour reminder is sent late).

Automations created by Mo or by Claude through the Minimo MCP turn it on for reminders. A step that must still go out late, like a confirmation question, keeps it off: say so in the prompt ("send it even if the deadline has passed"). For waits you add by hand it is off unless you switch it on.

## Ask only who has not confirmed

A step can depend on a condition, with nothing on the other side. Example: at the confirmation deadline, players who have not confirmed get "Will you play tonight?", the others skip it. Then every player gets the reminders.

1. **Wait:** until `CONFIRM_BY`, with *Skip the next step if this moment has already passed* off, so a player who registers after the deadline is asked right away.
2. **Condition:** `CONFIRMED` is true → no step (skip). Otherwise → **Send email** "Will you play tonight?".
3. Both paths join again on the next step: the reminders before the start, written once.

Put the condition on the players who *have* confirmed and leave that side empty: "is false" does not match a player whose field is still empty, while the *otherwise* side catches both.

Describe it in plain words to Mo or to Claude through the Minimo MCP ("if the player has not confirmed send..., otherwise go on; then remind everyone 8 hours, 1 hour and 10 minutes before"): the draft comes out with the empty branch and the shared reminders, no duplicated emails.

If the contact has no value in the date field (or the value is not a date), the run stops at the wait and nothing after it is sent.

## When the date changes

The wait computes its moment once, when the contact reaches it. With a **Field updated** trigger on the date field, every change of the date starts the automation again for that contact. By default each start is a separate run, so a player whose tournament moves from 21:00 to 22:00 while waiting would be in the flow twice and get the reminder twice: once at the old time, with the old details, and once at the new time.

Set the trigger mode to **every time (latest run only)** (the menu next to *Starts* on the trigger card). A new start then cancels the run still in progress for that contact and the new run takes over, with the current date and the current field values. One run per contact, one reminder, at the right time.

* Automations created by Mo or by Claude through the Minimo MCP use this mode on their own when the trigger and the wait use the same date field.
* To switch it on an existing automation, ask Mo or Claude ("keep one run per contact") or pick the mode in the builder.
* A replaced run shows in the automation's activity as exited, reason *replaced by a newer run*.
* **Only first time** is a different thing: the contact enters the automation once, ever, so a player would never be reminded of a second tournament. Don't use it for recurring events.

## Service emails: reach every registered player

Each email step has a category, shown as a pill on the step:

* **Marketing** (the default for automation emails): sent only to contacts with email marketing consent, from your marketing subdomain (for example `news.yourdomain.com`) when you have one.
* **Utility**: always sent, consent is not checked. It goes from the sender set on the email; with no sender set, from a verified sender on your main (transactional) domain, or from a Minimo address if that domain is not verified yet. Set the sender on the email to keep your own address.

A reminder for something the contact signed up to (a tournament, a booking, an appointment) is a service email: make it **Utility**. Keep promotional emails (a new tournament, an offer) on Marketing. With Claude, the automation's emails are listed in the create result and `minimo_template_set-category` (scope `automation`) switches each one.

When a marketing email is not sent because the contact has no marketing consent, the step is recorded as **skipped** (reason: no marketing consent) in the automation's activity, with its own badge on the step, so a run that sent nothing never looks like a success.

## Show the time in the email

A field placeholder such as `{NEXT_TOURNAMENT_START}` is replaced with the value exactly as it is stored: there are no format or time zone options in the email, so a datetime field prints as a UTC timestamp (for example `2026-11-01 20:00:00+00`).

To write "today at 21:00" in your own time zone, add a text field that already holds the formatted time, computed from your database with the time zone you want:

```sql theme={null}
to_char(t.inizio AT TIME ZONE 'Europe/Rome', 'HH24:MI')   -- 21:00
```

Ask Mo for it ("a text field NEXT\_TOURNAMENT\_TIME with the start time of the next tournament in Rome time, HH:MM"), or have Claude create it from a query. Then write the sentence in the email: *The tournament starts today at {NEXT_TOURNAMENT_TIME}*.

* Keep the datetime field for the wait (the wait needs a real date) and use the text field only in the copy.
* "Today" is safe when the reminder always lands on the event day (1 hour before; 6 hours before an evening event). For a reminder that can fall on the day before, add a second text field with the date, for example `to_char(t.inizio AT TIME ZONE 'Europe/Rome', 'DD/MM')`, and write "on {NEXT_TOURNAMENT_DAY} at {NEXT_TOURNAMENT_TIME}".
* The email uses the field values of the run that sends it. With **every time (latest run only)** that is the latest run, so a moved tournament shows the new time.

## Good to know

* **One date per contact.** A wait reads one value. With a dynamic field like "next tournament start", a player registered to several tournaments is reminded for the nearest one; the next one gets its reminders when the field moves to it.
* **A new-row trigger does not carry the row.** A trigger on a new row in a synced table starts the flow for the matched contact, but the row's own values do not reach the steps today. Read the date from a contact field instead: a dynamic field such as the next tournament start, a Field updated trigger and a wait until N hours before, exactly the pattern above.
* **The date is read when the wait starts.** Each wait reads the field at that moment, so a second wait uses the current value. If the date can change while the contact waits, use **every time (latest run only)**.
* **Time zones.** Store dates with their time zone (for example a Postgres `timestamptz`). The reminder fires at that exact instant.
* **Recompute on data changes.** A dynamic field is recomputed when its data changes, not only because time passed. See [Dynamic fields](https://docs.minimo.it/product/data-sync/dynamic-fields.md).

> [!TIP]
>
> Other uses of the same pattern: appointment reminders (1 day and 2 hours before `appointment_at`), renewal notices (7 days before `renews_at`), trial endings (3 days before `trial_ends_at`), follow-ups after an event (1 day after `event_end`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.