How to Track Pet Vaccination Expiry Dates in Google Sheets and Email Owners Reminders (2026)
If you run a dog daycare, a boarding kennel, a grooming salon, a training class or a pet-sitting service, you probably can't accept a pet whose rabies, DHPP or Bordetella record has run out, and you find out at the front desk on the morning of the stay. The fix is boring but it works: keep every vaccination record's expiry date in one place, look ahead, and ask owners for the new certificate weeks before it lapses. This guide builds that in Google Sheets: one row per vaccination record, formulas that show which records expire soon and whether a pet is cleared for an upcoming stay, and a free Apps Script that emails each owner one friendly reminder covering all of their pets, with a preview mode so you can check every email before anything goes out. The same sheet works for cats, rescues tracking foster animals, and households with several pets.
Your policy sets the rules, the certificate sets the date. Which vaccines you require is up to your business, your insurer and local law. For reference, the AAHA canine vaccination guidelines list rabies “as required by law”, recommend distemper/adenovirus/parvovirus (DHPP) boosters at 3-year intervals once the first-year booster is done, and annual boosters for Bordetella, canine influenza and leptospirosis. Products differ, though (rabies vaccines come in 1-year and 3-year versions, for example), so the sheet doesn't guess: type the expiry or “next due” date printed on the certificate.
Step 1: a Vaccines tab with one row per record
Name the tab Vaccines. Each row is one vaccine for one pet, so a dog with three required vaccines has three rows. When a new certificate comes in, add a new row (the old one stays as history) or type the new date over the old one; the formulas and the script only ever look at the latest expiry per pet and vaccine. The script finds columns by their header, so the order is up to you, but the formulas below assume this layout:
| Col | Header | What goes in it |
|---|---|---|
| A | Pet | The pet's name as you know it at the desk |
| B | Pet ID | Optional. Your client or pet number, if you have one; it keeps two pets with the same name apart. Without it, the pet's name plus the owner's email does that. |
| C | Owner email | Where the reminder goes. Two owners? Separate the addresses with commas. |
| D | Vaccine | Rabies, DHPP, Bordetella, Canine influenza, Leptospirosis, FVRCP… Use a Data › Data validation dropdown so each vaccine is always spelled the same way. |
| E | Given on | Date the vaccine was given (optional, used by the formula below) |
| F | Expires | The expiry or next-due date on the certificate |
| G | Status | Blank normally. Inactive, Moved, Moved away, Deceased, Passed away, Exempt, Medical exemption or Not required stop the reminders for that record. |
| H | Sent log | Leave empty; the script records what it sent |
| I | Current | A helper formula (below) that marks old records as Replaced |
Format E and F as dates (Format › Number › Date). Keep the sheet to what you need for reminders: pet, owner email, vaccine and dates. Phone numbers, addresses and the certificates themselves can stay in your booking system or a Drive folder.
Expiry from the date given. If a certificate only shows the date given, you can work out a provisional expiry. Add a tab named Terms with each vaccine in column A and how many months your policy accepts it for in column B (for example 12 for Bordetella, or 12 or 36 for rabies depending on the product), then put this in F2 and fill down. Type over it wherever the certificate prints its own date:
=IF(OR(D2="",E2=""),"",IFERROR(EDATE(E2,VLOOKUP(D2,Terms!A:B,2,FALSE)),""))
Which record is current. In I2, fill down. It compares each row with the latest expiry for the same pet, owner and vaccine:
=IF(F2="","",IF(F2=MAXIFS(F$2:F,A$2:A,A2,C$2:C,C2,D$2:D,D2),"Current","Replaced"))
(If you use Pet ID, compare on it instead: MAXIFS(F$2:F,B$2:B,B2,D$2:D,D2).) The script works this out by itself, so the column is only for you.
Step 2: see what is expiring and who is cleared
Select A2:I, open Format › Conditional formatting, choose Custom formula is, and add these rules in this order:
| Custom formula | Color | Meaning |
|---|---|---|
=OR($I2="Replaced",REGEXMATCH(LOWER($G2),"^(inactive|moved|moved away|deceased|passed away|exempt|medical exemption|not required)$")) | Grey text | History or stopped, no reminders |
=AND($I2="Current",$F2<TODAY()) | Red | Expired |
=AND($I2="Current",$F2>=TODAY(),$F2<=TODAY()+30) | Amber | Expires in the next 30 days |
Every current record that expires in the next 30 days (or already has), soonest first, on a summary tab:
=SORT(FILTER({Vaccines!A2:A, Vaccines!D2:D, Vaccines!F2:F, Vaccines!C2:C},
Vaccines!I2:I="Current", Vaccines!F2:F<=TODAY()+30,
NOT(REGEXMATCH(LOWER(Vaccines!G2:G),
"^(inactive|moved|moved away|deceased|passed away|exempt|medical exemption|not required)$"))),
3, TRUE)
Is this pet cleared for its stay? Make a tab named Check-in, type the pet's name in B1 and the last day of the stay in B2, and put this in A4. It lists your required vaccines with the latest expiry on file and flags anything missing or running out before the stay ends:
=LET(pet, B1, last, B2,
need, {"Rabies";"DHPP";"Bordetella"},
exp, MAP(need, LAMBDA(v, MAXIFS(Vaccines!F2:F, Vaccines!A2:A, pet, Vaccines!D2:D, v))),
HSTACK(need,
MAP(exp, LAMBDA(e, IF(e=0, "", e))),
MAP(exp, LAMBDA(e, IF(e=0, "MISSING", IF(e<last, "EXPIRES BEFORE CHECKOUT", "OK"))))))
Edit the list in need to match your policy, and format column B of the result as a date. MAXIFS returns 0 when there is no record at all, which is what “MISSING” catches. If two pets share a name, match on Pet ID instead of the name.
Step 3: email owners before a record expires
Google Sheets doesn't send email when a date arrives. Its conditional notifications react to cell edits, are only available on some work or school accounts, and Google notes they don't fire when a TODAY() formula changes while the file is closed. A short Apps Script with a daily trigger does the job. Open Extensions › Apps Script, paste this, and at the top set BUSINESS_NAME (it signs the email and becomes the sender name), and optionally REPLY_TO (for example your front-desk address) and STAFF_EMAIL. Save, then:
- Run
sendVaccineRemindersonce and approve the permissions.PREVIEWistrue, so every email goes to you, with the real recipients in the subject, and nothing is logged. - Read the preview emails as if you were the owner. When they look right, set
PREVIEW = falseand save. - Add the trigger: Triggers › Add trigger › sendVaccineReminders › Time-driven › Day timer, for example 8 to 9 AM.
/**
* Pet vaccination reminders from a "Vaccines" tab: one row per vaccine record
* (a pet, a vaccine and the date it expires). When a new certificate comes
* in, either add a new row or type the new date over the old one: only the
* latest expiry per pet and vaccine is ever reminded about.
* Headers used (any order): Pet, Pet ID, Owner email, Vaccine, Expires,
* Status, Sent log. Pet ID and Status are optional. Owner email can hold
* several addresses, comma-separated.
* Each owner gets one email per run covering all of their pets, and the
* optional STAFF_EMAIL gets one summary of what went out.
*/
const SHEET_NAME = 'Vaccines';
const REMIND_DAYS = [30, 14, 3]; // days before Expires
const OVERDUE_DAYS = [1, 7]; // days after, while no newer record is in
const STALE_DAYS = 30; // expired longer ago than this: no email at all
const STOP_STATUS = /^(inactive|moved|moved away|deceased|passed away|exempt|medical exemption|not required)$/i;
const BUSINESS_NAME = 'Your business name';
const REPLY_TO = ''; // where owners' replies go; blank = you
const STAFF_EMAIL = ''; // optional summary for the front desk
const PREVIEW = true; // true: everything goes to you, nothing is logged
const MAX_EMAILS = 50; // safety cap per run (owner emails)
const LOG_KEEP = 20; // entries kept in each Sent log cell
const SUBJECT = 'Vaccination reminder for {{Pets}}';
const INTRO = 'Hello,\n\nOur records show these vaccinations are due for renewal:';
const OUTRO = 'Please send us a copy of the updated certificate from your veterinarian ' +
'(a photo or PDF is fine) before your next visit. If you have already sent it, ' +
'thank you, and please ignore this email.';
function sendVaccineReminders(now) {
const lock = LockService.getDocumentLock();
if (!lock.tryLock(30000)) return; // another run is still going
try {
// A time-driven trigger passes an event object, so only use a real Date.
return remind_(now instanceof Date ? new Date(now) : new Date());
} finally {
lock.releaseLock();
}
}
function remind_(now) {
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName(SHEET_NAME);
if (!sh) throw new Error(`No tab named ${SHEET_NAME}.`);
const rows = sh.getDataRange().getValues();
const head = rows[0].map((h) => String(h).trim().toLowerCase());
const col = (name) => head.indexOf(name.toLowerCase());
const c = { pet: col('Pet'), id: col('Pet ID'), to: col('Owner email'), vax: col('Vaccine'),
exp: col('Expires'), status: col('Status'), log: col('Sent log') };
if ([c.pet, c.to, c.vax, c.exp, c.log].includes(-1)) {
throw new Error('Need Pet, Owner email, Vaccine, Expires and Sent log columns.');
}
// Count days in the spreadsheet's own time zone (File > Settings).
const tz = ss.getSpreadsheetTimeZone();
const ymd = (d) => Utilities.formatDate(d, tz, 'yyyy-MM-dd');
const dayNum = (d) => Date.UTC(...ymd(d).split('-').map((x, i) => +x - (i === 1 ? 1 : 0))) / 86400000;
const today = dayNum(now);
const isDate = (v) => v instanceof Date && !isNaN(v);
const EMAIL = /^[^\s@,;]+@[^\s@,;]+\.[^\s@,;]+$/;
const me = Session.getEffectiveUser().getEmail();
const norm = (s) => String(s).trim().toLowerCase().replace(/\s+/g, ' ');
const text = (row, i) => (i === -1 ? '' : String(row[i]).trim());
const owners = (row) => [...new Set(text(row, c.to).split(/[,;]/).map((s) => s.trim().toLowerCase()).filter(String))].sort();
// Pass 1: the latest expiry per pet and vaccine. Older rows are history.
// Pet ID (if you have the column) tells apart two pets with the same name;
// otherwise the pet's name plus the owner's email does.
const keyOf = (row) => (text(row, c.id) ? 'id:' + norm(row[c.id]) : norm(row[c.pet]) + '|' + owners(row).join(',')) + '|' + norm(row[c.vax]);
const latest = {};
for (let r = 1; r < rows.length; r++) {
const row = rows[r];
if (!text(row, c.pet) || !text(row, c.vax) || !isDate(row[c.exp])) continue;
const k = keyOf(row), d = dayNum(row[c.exp]);
if (!(k in latest) || d > latest[k].d) latest[k] = { d, r };
}
const groups = {};
let badEmail = 0, replaced = 0;
for (let r = 1; r < rows.length; r++) {
const row = rows[r];
if (!text(row, c.pet) || !text(row, c.vax) || !isDate(row[c.exp])) continue;
if (latest[keyOf(row)].r !== r) { replaced++; continue; } // a newer record exists
if (STOP_STATUS.test(text(row, c.status))) continue;
const left = dayNum(row[c.exp]) - today; // negative = expired
if (left < -STALE_DAYS) continue; // long lapsed: not a reminder any more
// The one step that fits today: no pile of earlier ones after a gap,
// and an expired record never gets a "before" reminder.
const steps = REMIND_DAYS.concat(OVERDUE_DAYS.map((n) => -n));
const hit = steps.filter((s) => left <= s && (left >= 0 || s < 0)).sort((a, b) => a - b)[0];
if (hit === undefined) continue;
const sent = String(row[c.log] || '').split(';').filter(String);
const key = `${ymd(row[c.exp])}@${hit}`; // a new date starts over
if (sent.includes(key)) continue;
const list = owners(row);
if (!list.length || !list.every((a) => EMAIL.test(a))) {
badEmail++; console.log(`Row ${r + 1}: check the Owner email column`); continue;
}
const to = list.join(',');
const date = Utilities.formatDate(row[c.exp], tz, 'EEE, MMM d, yyyy');
const when = left > 1 ? `expires ${date} (in ${left} days)` : left === 1 ? `expires ${date} (tomorrow)` :
left === 0 ? `expires ${date} (TODAY)` : left === -1 ? `EXPIRED ${date} (1 day ago)` :
`EXPIRED ${date} (${-left} days ago)`;
const g = (groups[to] = groups[to] || { to, n: list.length, items: [] });
g.items.push({ r: r + 1, left, pet: text(row, c.pet), line: `- ${text(row, c.pet)}: ${text(row, c.vax)} ${when}`,
log: sent.concat(key).slice(-LOG_KEEP).join(';') });
}
// Most urgent owner first, in case the quota runs out.
const order = Object.values(groups).map((g) => {
g.items.sort((a, b) => a.left - b.left || a.r - b.r);
g.worst = g.items[0].left;
g.pets = [...new Set(g.items.map((i) => i.pet))]; // most urgent pet named first
return g;
}).sort((a, b) => a.worst - b.worst);
const petList = (p) => (p.length < 3 ? p.join(' and ') : p.slice(0, -1).join(', ') + ' and ' + p[p.length - 1]);
const done = [];
for (const g of order) {
if (done.length >= MAX_EMAILS || MailApp.getRemainingDailyQuota() < (PREVIEW ? 1 : g.n)) break;
const subject = (g.worst < 0 ? 'Action needed: ' : '') + SUBJECT.replace('{{Pets}}', petList(g.pets));
// Owners never see the sheet link: it is your internal record.
const body = [INTRO, '', ...g.items.map((i) => i.line), '', OUTRO, '', BUSINESS_NAME].join('\n');
const mail = { to: PREVIEW ? me : g.to, subject: PREVIEW ? `[PREVIEW to ${g.to}] ${subject}` : subject, body, name: BUSINESS_NAME };
if (REPLY_TO) mail.replyTo = REPLY_TO;
MailApp.sendEmail(mail);
done.push(g);
if (!PREVIEW) {
// Log right after each email, so a crash can't cause a repeat.
g.items.forEach((i) => sh.getRange(i.r, c.log + 1).setValue(i.log));
SpreadsheetApp.flush();
}
}
let staff = false;
if (STAFF_EMAIL && done.length && MailApp.getRemainingDailyQuota() >= 1) {
const expired = done.filter((g) => g.worst < 0).length;
const lines = done.map((g) => [g.to, ...g.items.map((i) => ' ' + i.line)].join('\n'));
const left = order.length - done.length;
const subject = `Vaccination reminders sent to ${done.length} owner${done.length === 1 ? '' : 's'} (${expired} with expired records)`;
MailApp.sendEmail({
to: PREVIEW ? me : STAFF_EMAIL,
subject: PREVIEW ? `[PREVIEW to ${STAFF_EMAIL}] ${subject}` : subject,
body: [...lines, '', left ? `${left} owner(s) left for the next run (quota or MAX_EMAILS).` : 'Nothing left over.',
badEmail ? `${badEmail} row(s) need a valid Owner email.` : '', '', `Sheet: ${ss.getUrl()}`].join('\n'),
});
staff = true;
}
const result = { sent: done.length, left: order.length - done.length, badEmail, replaced, staff, preview: PREVIEW };
console.log(JSON.stringify(result));
return result;
}
How it behaves:
- One email per owner. Each run, every owner with something new gets a single email covering all of their pets, most urgent first: “Biscuit: Bordetella expires Thu, Nov 19, 2026 (in 3 days)”. The subject names the pets (“Vaccination reminder for Mochi and Biscuit”) and starts with “Action needed:” when a record has already expired. A row with two addresses sends one email to both.
- Owners never see your sheet. The email is plain text with your intro, the list, a request for the updated certificate and your business name, and no link to the spreadsheet. Change
INTROandOUTROto your own wording, such as where to send the certificate. - When reminders go. 30, 14 and 3 days before the expiry date (
REMIND_DAYS), then 1 and 7 days after if no newer record has arrived (OVERDUE_DAYS), then it goes quiet. Records that expired more than 30 days ago (STALE_DAYS) are never emailed, so importing an old client list doesn't send a wave of “expired” emails to people who stopped coming. - New certificate? Add a row or type the new date. Only the latest expiry per pet and vaccine counts, matched without regard to capitals or extra spaces, so a newer row silences the old one. The Sent log is keyed to the expiry date, so typing a new date over the old one starts a fresh cycle. A newer row marked Exempt also silences that vaccine.
- No pile-up. A record added late, or a few days without the trigger, gets only the latest reminder that applies, once. An expired record never gets a “before” reminder.
- Front-desk summary. With
STAFF_EMAILset, one extra email per run lists every owner who was reminded and what about, how many owners are left for the next run, and rows with a missing or broken Owner email, with a link to the sheet. - Safe to rerun. Rows are logged right after each email, a document lock stops two runs overlapping, at most
MAX_EMAILSowner emails go per run, and it stops before your daily Apps Script email quota runs out (100 recipients a day on a consumer Gmail account, 1,500 on Google Workspace; an email to two owners counts as two). Anything left goes on the next run, most urgent first. The log keeps the last 20 entries per row.
Tips
- Update the sheet when the certificate arrives, not when the owner says it's done. Type the date from the certificate itself. Until then the reminders keep going, which is the point.
- Ask for it early. The first reminder at 30 days gives owners time to book a vet visit; if your vets are booked weeks out, change
REMIND_DAYSto[45, 21, 7]. - Before a booking. Use the Check-in tab when a reservation comes in, not only at drop-off, so there is time to fix a record that runs out mid-stay.
- Cats, rescues and fosters. Nothing in the sheet is dog-specific: add FVRCP or feline leukemia to the Vaccine dropdown, and for a foster animal put the foster's address in Owner email.
- Grooming and training appointments are a separate list with its own reminders; see appointment reminder emails. For staff certifications such as pet first aid, see the license and certification tracker.
- Check the time zone. The script counts days in the spreadsheet's time zone (File › Settings › Time zone), and the trigger fires in the Apps Script project's time zone (Project Settings).
- Ownership. Triggers run as whoever created them, and the emails come from that account. Set them up from the business's shared account, not one employee's, so they keep working when someone leaves.
See SheetReminders
Short on time? Watch the 50-second version
Related Google Sheets guides
- How to generate a PDF or Google Doc for each row in Google Sheets
- Find and remove duplicates in Google Sheets
- Compare two columns or two sheets for duplicates
- Find case-insensitive and fuzzy duplicates in Google Sheets
- Best Autocrat alternatives for mail merge to PDF and Docs
- Make invoices or certificates from Google Sheets rows
- Create sales quotes or estimates from Google Sheets
- Generate receipts from Google Sheets rows
- Create purchase orders from Google Sheets
- Make packing slips from Google Sheets orders
- Generate a PDF certificate from a Google Form response
- Issue numbered training completion certificates with expiry dates
- Make a PDF progress report for each student
- Generate offer letters from a Google Sheets hiring tracker
- Generate contracts and agreements from a Google Docs template
- Make work orders for service jobs from Google Sheets
- Email each row’s PDF as an attachment
- Automatic email reminders from a date column
- Contract renewal and expiration alerts from Google Sheets
- Track certificate of insurance (COI) expirations in Google Sheets
- Track employee license and certification expirations
- Track equipment and vehicle maintenance with reminders
- Equipment sign-out sheet with due-back and overdue reminders
- Track warranty expiration dates with reminders
- Birthday and work anniversary reminders from Google Sheets
- Rent due and lease renewal reminders from Google Sheets
- Send invoice payment reminders from Google Sheets
- Highlight overdue tasks and send email reminders
- Follow-up reminders for leads, clients and candidates
- Membership renewal reminders for clubs and associations
- Appointment reminder emails for clients
- Probation and performance review reminders for managers
- Inventory expiration dates with email alerts
- Domain and SSL certificate renewal reminders
- Name badges and place cards from a guest list
- Vehicle registration, inspection and insurance reminders
- Event sign-in sheets and table seating lists
- Customer account statements with aging
- Subscription tracker with renewal and free-trial reminders
- Mailing labels: one per household, clean addresses
- Volunteer shifts: open slots, reminders and rosters
- Year-end donor giving statements, one PDF per donor
- Volunteer hours verification letters, one PDF per request
- Instrument calibration due dates with email reminders
- Pay stubs from a payroll sheet, one PDF per employee
- Gift certificates with codes, balances and a redemption log
- Bill due dates: mark paid, 30-day totals and reminders
- Grant deadlines: LOIs, reports, owners and reminders
- Passport expiry: trips, the 6-month rule and renewal reminders
- Class rosters: one PDF per class, A–Z, with seat counts
- Insurance renewals: premium changes and reminders
- Onboarding checklists: tasks from start dates, owner reminders
- Raffle tickets: numbered stubs, seller books, sales tracker
- SheetWeave vs Autocrat
- SheetWeave vs Document Studio
- SheetWeave vs RowDocs
Instructions refer to Google Sheets, Apps Script and the AAHA guidelines cited as they stood on November 15, 2026. Not veterinary or legal advice, and not affiliated with Google, AAHA or any veterinary practice. Google Sheets is a trademark of Google LLC. Vaccine requirements and durations vary by product, local law and your own policy, so ask a veterinarian and check each certificate. Questions or corrections: hello@loomwise.app.