Blog · · 6 min read

How to remind customers before their gift card or voucher expires with n8n and AI

Step-by-step guide so n8n checks your gift cards and vouchers in Google Sheets every morning, spots the ones about to expire and drafts a clear Gmail reminder with AI before unused balance is lost.

In a shop, restaurant, spa or any business with gift cards and vouchers, you note the expiry date… and it slips by. The customer (or the gift recipient) is left with unused balance, you miss a visit and a possible add-on sale, and you end up handling complaints after hours.

In this guide you will build an n8n workflow that every morning checks a register of gift cards and vouchers in Google Sheets, finds the ones expiring in ~14 or ~3 days and drafts a clear Gmail reminder with AI. You review the draft and send it.

This is not the same as a session-pack expiry reminder: there the customer has a pack of classes or treatments with sessions left; here they have a redeemable amount or voucher (gift card, gift cheque, prepaid coupon). It also does not replace a subscription renewal reminder: that is a recurring plan; this is prepaid balance with a hard end date. And it is not a quote follow-up: there you chase a commercial offer; here you warn that an already-purchased voucher is about to expire.

What you will build

A five-step workflow that runs on its own every day:

  1. Daily trigger: a Schedule Trigger node runs at 09:25.
  2. Read vouchers: a Google Sheets node reads your “Gift cards & vouchers” sheet.
  3. Filter by expiry and balance: a Code node keeps rows expiring in ~14 or ~3 days, with remaining balance > 0, that have not yet had that stage’s reminder.
  4. AI reminder: a Basic LLM Chain node writes a warm email that recalls the voucher, the balance and the expiry date.
  5. Draft and log: Gmail creates the draft and Google Sheets records the stage in reminder_sent.

What you need

  • An n8n instance (cloud or installed free on your computer).
  • Google Sheets and Gmail connected in n8n.
  • An OpenAI (or other AI) API key, with a monthly spend limit set in the provider’s dashboard.
  • A “Gift cards & vouchers” sheet with these columns: customer, email, code (voucher reference), product (type: “€50 gift card”, “Dinner for 2 voucher”…), balance_left, currency (EUR), expires_on (YYYY-MM-DD), notes and reminder_sent (empty or 1 / 2).

You can fill the sheet by hand when you issue a voucher, or with another n8n workflow that writes each sale and decrements balance_left as it is redeemed. This guide assumes the rows are already in Sheets.

Step 1: prepare the vouchers sheet

Keep expires_on in a consistent date format (YYYY-MM-DD). Leave only active vouchers with balance; archive fully redeemed or already expired ones. In product use clear names. Update balance_left every time it is redeemed (by hand or with another workflow). In notes capture useful preferences (“prefers WhatsApp”, “gift from Ana”, “wants tasting menu”).

Step 2: trigger and read

Add a daily Schedule Trigger at 09:25 (check the workflow timezone in Settings is Europe/Madrid or your local zone). Connect it to Google Sheets → Get Row(s) pointing at your “Gift cards & vouchers” sheet.

Step 3: filter vouchers that are about to expire

Add a Code node (Run Once for All Items) with this code:

const today = new Date(); today.setHours(0, 0, 0, 0);
const out = [];
for (const i of $input.all()) {
  const c = i.json;
  if (!c.email || !c.expires_on) continue;
  const bal = Number(c.balance_left);
  if (!Number.isFinite(bal) || bal <= 0) continue; // no balance
  const exp = new Date(c.expires_on); exp.setHours(0, 0, 0, 0);
  const days = Math.round((exp - today) / 86400000);
  if (days < 0 || days > 16) continue; // already expired or too far out
  const already = Number(c.reminder_sent || 0);
  let stage = null;
  if (already < 1 && days >= 12 && days <= 15) stage = 1;   // ~14 days
  else if (already <= 1 && days >= 0 && days <= 4) stage = 2; // ~3 days
  if (!stage) continue;
  out.push({ json: { ...c, days, stage, balance_left: bal } });
}
return out;

Each voucher gets at most two reminders: one ~two weeks ahead and one in the final days. If balance_left is 0, the row is skipped. If nothing is due, the workflow ends without spending AI credits. You can tweak the windows (12–15 and 0–4) for your industry.

Step 4: draft the reminder with AI

Add a Basic LLM Chain with a small cheap model (for example gpt-4o-mini) and this prompt:

You manage gift cards and vouchers for [BUSINESS NAME]. Write a short email to
{{ $json.customer }} letting them know that their “{{ $json.product }}” (ref. {{ $json.code }}) expires on
{{ $json.expires_on }} ({{ $json.days }} days left).
Balance left: {{ $json.balance_left }} {{ $json.currency }}.
Notes: {{ $json.notes }}
- Warm, professional tone, max 7 sentences.
- Remind them of the balance and the expiry date; do not alarm or blame.
- Invite them to redeem it or book if applicable; do not invent prices, menus or discounts.
- If notes include preferences (channel, intended use), take them into account without inventing data.
- Do not invent booking links, amounts or dates that are not in the data.
Return only the email body.

The facts come from your sheet; the AI only sets the tone. If your POS or loyalty software already sends its own expiry email, use this flow as a warmer second reminder or for vouchers you manage by hand.

Step 5: create the draft and mark the reminder

Connect a Gmail → Create Draft node with recipient {{ $('Code').item.json.email }}, subject Your voucher expires soon · {{ $('Code').item.json.product }} and the AI text as the body. Drafts let you review before sending, just like session-pack expiry reminders or subscription renewal reminders.

Then a Google Sheets → Update Row node that looks up by email + code (or expires_on if you do not use codes) and writes the stage into reminder_sent.

Once you trust the wording, you can switch Create Draft to Send.

How to test it

  1. Add a test row with your own email, an expires_on about 14 days out, balance_left > 0 and reminder_sent empty.
  2. Run the workflow by hand and check that a draft appears and reminder_sent becomes 1.
  3. Run it again: no new draft should be created (outside the stage-1 window).
  4. Change expires_on so ~3 days remain (leaving reminder_sent at 1) and confirm the second reminder is prepared.
  5. Set balance_left to 0 and confirm the workflow creates no reminder.

Cost and good practices

  • Cost: each reminder costs well under a tenth of a cent on the AI API. Set a monthly spend limit in the provider’s dashboard.
  • Don’t nag: at most ~2 reminders per voucher; if they do not redeem, log it and later, if it fits, use a win-back inactive customers flow.
  • Keep balance_left up to date: if you do not decrement on redemption, you will warn about spent vouchers or skip vouchers that still have balance.
  • Respect voucher rules: many countries have minimum validity periods or other gift-card rules; this flow reminds, it does not invent your legal policy.
  • Don’t invent prices or links: the prompt must not invent offers that are not in your data.
  • Catch failures: add an error workflow so you know if Gmail or Sheets fails, as in n8n error handling.
  • Combine it with appointment reminders once the customer books to redeem the voucher, and with session-pack expiry reminders if you also sell class packs.

Start with ready-made templates

If you’d rather skip the basic n8n setup, download the WhatsApp agent for free or check out the AgentKiosk pack: 8 ready-to-import agents in English and Spanish, each with workflow, prompt and guide, ready to combine with these gift-card and voucher expiry reminders.