Blog · · 4 min read

How to remind customers before insurance and documents expire with n8n and AI

Step-by-step guide to having n8n check expiry dates in Google Sheets every morning, spot policies, MOT/ITV, licences or certificates ending soon and use AI to draft a helpful reminder.

In an accountancy firm, a clinic, a garage, a training school or a back-office service you note the expiry date of an insurance policy, a vehicle inspection, a professional licence or a certificate… and it sits in the sheet. Weeks later the customer calls because the deadline slipped — or worse, they had a problem without cover and you never warned them in time.

In this guide you'll build an n8n workflow that checks your expiry dates in Google Sheets every morning, finds items expiring in 30 or 7 days and uses AI to write a personalised Gmail draft. You review the draft and send it.

What you'll build

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

  1. Daily trigger: a Schedule Trigger node runs at 9:15.
  2. Read expiries: the Google Sheets node reads your "Expiries" sheet.
  3. Date filter: a Code node keeps rows expiring in 30 or 7 days that haven't been reminded at that stage yet.
  4. AI reminder: a Basic LLM Chain node writes a friendly email recalling the document, the expiry date and what the customer can do.
  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 for free on your computer).
  • Google Sheets and Gmail connected in n8n.
  • An OpenAI (or other AI provider) API key, with a monthly spending limit set in its dashboard.
  • An "Expiries" sheet with these columns: customer, email, document_type, reference, issuer, expires_on (YYYY-MM-DD), notes and reminder_sent (empty).

Step 1: set up the expiries sheet

The key is that expires_on always uses the same date format. In document_type use clear labels ("liability insurance", "MOT", "professional licence", "ISO certificate"). In issuer note who issued it (insurer, authority, professional body) and in notes useful details such as "prefers WhatsApp" or "renews with us".

Step 2: trigger and read

Add a daily Schedule Trigger at 9:15 (check the workflow time zone in Settings). Connect it to Google Sheets → Get Row(s) pointing at your "Expiries" sheet.

Step 3: filter items expiring soon

Add a Code node (Run Once for All Items mode) 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 days = Math.round((new Date(c.expires_on) - today) / 86400000);
  let stage = null;
  if (days <= 7 && days >= 0) stage = '7';
  else if (days <= 30 && days > 7) stage = '30';
  if (!stage || String(c.reminder_sent) === stage) continue;
  out.push({ json: { ...c, days, stage } });
}
return out;

Each customer gets at most two reminders: one a month ahead and one in the final week. If nothing is due, the workflow ends without spending AI credits.

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 support customers for [BUSINESS NAME]. Write a short email to
{{ $json.customer }} reminding them that their {{ $json.document_type }}
(reference {{ $json.reference }}, issuer {{ $json.issuer }}) expires on {{ $json.expires_on }}
({{ $json.days }} days left).
Notes: {{ $json.notes }}
- Friendly, professional tone, in English, max 6 sentences.
- Recall the date and document type without alarmism.
- Offer, without inventing prices or legal deadlines, help renewing it if your business handles that.
- End by inviting a reply to this email.
- Do not invent dates, cover or legal terms.
Return only the email body.

The facts come from your sheet; the AI only sets the tone. If you do not handle the renewal yourself, remove that line from the prompt.

Step 5: create the draft and log the reminder

Connect a Gmail → Create Draft node with recipient {{ $('Code').item.json.email }}, subject Your {{ $('Code').item.json.document_type }} expires soon and the AI text as the body. Drafts let you review before sending, same idea as contract renewal reminders or product warranty expiry reminders.

Then a Google Sheets → Update Row node that matches on email + reference and writes stage into reminder_sent.

When you trust the copy, you can switch Create Draft to Send.

How to test it

  1. Add a test row with your own email and an expires_on date 20 days out.
  2. Run the workflow manually and check the draft appears and reminder_sent becomes 30.
  3. Run it again: no new draft should be created.
  4. Change the date to 5 days out and confirm the second reminder is prepared.

Cost and good practices

  • Cost: each reminder costs well under a tenth of a cent in AI API usage.
  • Be clear on responsibility: the reminder recalls the date you recorded; it does not replace the customer's own duty or professional advice.
  • Error alerts: add an error workflow so you know if Gmail or Sheets fails, as in n8n error handling.
  • Combine it with contract renewal reminders if you also track service renewals, and this flow for policies and documents.

Start with ready-to-import templates

If you want customer support in n8n already set up, download the free WhatsApp agent or check the full AgentKiosk pack: 8 tested agents in English and Spanish, each with workflow, prompt and guide, ready to import alongside these expiry reminders.