See llms.txt for all machine-readable content.

Back to Templates

Triage vet prescription refills and chase sign-offs with Sheets, Gmail, DeepSeek

Refill requests pile up in the inbox and every one of them needs the same checks: is this pet on the chart, is the medication controlled, has the vet seen the pet this year, and did anyone actually answer the owner. This workflow runs those checks in one pass, catches repeat requests, checks the AI reply against the rules decision before it goes out, and keeps chasing vet sign offs until someone decides.

Last updated: November 2026.

Quick Overview

A hosted form takes the refill request. Incomplete requests go to the front desk, and the same pet, owner and medication within 48 hours gets a short already received note instead of a second review. The chart in Google Sheets is matched by pet name and owner email, and code rules set the decision with no model involved. DeepSeek writes the owner reply, then a Code check holds any reply that sounds approved when it is not, names a dose that is not on the chart or skips the pet name. Sent replies are tracked in RefillLog with the Gmail message id. A weekday lane reminds vets about sign offs waiting a day and escalates to the practice manager after three, and the morning refill sweep never reminds the same owner twice in 20 days.

How it works

  1. The form collects pet name, owner email and name, medication, dosage and notes. Missing essentials are emailed to the front desk.
  2. Check Duplicate Request reads RefillLog. A matching request in the last 48 hours sends the owner the existing request id and stops.
  3. Match Patient pairs the request with the Patients tab and applies the rules: controlled medication or no refills left means needs_vet_review, an exam older than 365 days means needs_exam, otherwise approved. Unknown pets go to the front desk.
  4. DeepSeek writes the owner email and a vet note, told the decision is final. Parse Refill Reply falls back to a safe template when the model returns nothing.
  5. Check Reply Quality compares the wording with the decision, checks any mg dose against the chart, and requires the pet name. Held replies are logged with the reason and emailed to the front desk.
  6. Passing replies are logged with the vet email and sent with retries. Mark Owner Notified saves the message id, or marks the send as failed.
  7. Needs Vet Sign-off? emails the vet the chart facts, or tells the front desk to prepare the refill.
  8. Every weekday at 13:00 the chase lane finds needs_vet_review rows with no vet_decision after 24 hours. Under 72 hours the vet is reminded. After that the practice manager is told. Each chase updates chase_count and last_chased_at.
  9. Every morning at 08:30 pets last refilled 25 to 40 days ago are reminded, skipping anyone in ReminderLog from the last 20 days. Each reminder is logged and the front desk gets one digest.

Setup

  1. Create Patients, RefillLog and ReminderLog tabs. Add vet_email, owner_message_id, owner_notified_at, hold_reason, vet_decision, last_chased_at, chase_count and chase_stage columns to RefillLog.
  2. Connect Google Sheets and Gmail on every node that uses them.
  3. Add an OpenAI-compatible credential for DeepSeek on Refill Model.
  4. Put each vet sign off address on the chart rows, and replace [email protected] with the front desk and practice manager.
  5. Ask vets to fill vet_decision in RefillLog when they decide, which stops the chase.
  6. Send one test request and check the RefillLog row.

Quick Answers

Does the AI decide whether a refill is approved?
No. The decision is computed in code. The quality check also holds any reply whose wording does not match that decision.

What if an owner submits the same request twice?
A match on pet, owner and medication within 48 hours gets a short note with the existing request id and no second vet review.

What happens when a vet does not answer?
After 24 hours the vet gets a reminder each weekday. After 72 hours the practice manager is emailed instead.

Will owners get the refill reminder every morning?
No. ReminderLog records each reminder and the sweep skips any pet reminded in the last 20 days.

Additional info

Built with n8n. Need an assessment on your business? Feel free to reach out at https://khmuhtadin.com/consultation/