Blog · · 4 min read

How to remind customers before a product warranty expires with n8n and AI

Step-by-step guide to having n8n check your sales in Google Sheets every morning, spot warranties expiring soon and use AI to draft a helpful reminder for each customer.

You sell a phone, a boiler, a laptop, glasses or an appliance, note the warranty date… and it sits there. Months later the customer calls because something broke and cover has already ended — or worse, they have gone elsewhere without you offering an extension, a check-up or after-sales help.

In this guide you'll build an n8n workflow that checks your sales in Google Sheets every morning, finds warranties expiring in the next 30 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 sales: the Google Sheets node reads your "Warranties" 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 product, the end 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.
  • A "Warranties" sheet with these columns: customer, email, product, sku, purchased_on (YYYY-MM-DD), warranty_until (YYYY-MM-DD), notes and reminder_sent (empty).

Step 1: set up the warranties sheet

The key is that warranty_until always uses the same date format. If you sell with different terms (12, 24 or 36 months), calculate that date when you log the sale. In notes you can add useful details such as "includes yearly check" or "prefers WhatsApp".

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 "Warranties" sheet.

Step 3: filter warranties 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.warranty_until) continue;
  const days = Math.round((new Date(c.warranty_until) - 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 the warranty on "{{ $json.product }}"
(SKU {{ $json.sku }}) ends on {{ $json.warranty_until }}
({{ $json.days }} days left). Purchase date: {{ $json.purchased_on }}.
Notes: {{ $json.notes }}
- Friendly, professional tone, in English, max 6 sentences.
- Remind them they can still claim if something is wrong.
- Offer, without inventing prices, a check-up or to ask about an extension if you sell one.
- End by inviting a reply to this email.
- Do not invent dates, discounts or legal terms.
Return only the email body.

The facts come from your sheet; the AI only sets the tone. If you do not sell warranty extensions, 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.product }} warranty ends soon and the AI text as the body. Drafts let you review before sending, same idea as contract renewal reminders.

Then a Google Sheets → Update Row node that matches on email + sku 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 a warranty_until 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 the law: the reminder does not replace consumer rights; it only recalls the date you recorded.
  • Error alerts: add an error workflow so you know if Gmail or Sheets fails, as in n8n error handling.
  • Combine it with getting more Google reviews a few days after purchase, and this reminder near warranty end.

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 warranty reminders.