How to Automate Vendor Payment Reminders Using Gemini and Google Workspace
Step-by-step guide to automating vendor payment reminders using Gemini and Google Workspace: inbound AP reminders, outbound vendor chasers, prompt templates, and a Google Apps Script to run it automatically.
Key Takeaway
Payment reminder management is high-frequency, low-complexity work that quietly eats AP team time. This guide builds a two-directional reminder system inside Google Workspace, inbound alerts to your AP team and budget owners, and outbound chasers to vendors who owe you money, with Gemini drafting and a Google Apps Script triggering them automatically.
If you've followed this series so far
You have a working Gmail-to-Sheets invoice workflow. Invoices arrive in Gmail, Gemini extracts and validates them, and the data lands in your AP Invoice Tracker in Google Sheets. (Post 1, Gemini in Google Sheets and Post 2, Gmail invoice processing cover the build.)
Here's the problem that workflow doesn't solve yet
Invoices sit in that tracker. Due dates pass. Payment runs happen on their own schedule. And somewhere in the gap between "invoice received" and "payment released," things fall through. A vendor follows up because they haven't been paid. A finance charge lands on the next invoice because your payment was 12 days late. A budget owner gets an awkward call from a supplier they have a relationship with. None of this is malicious. It's just what happens when payment reminder management is manual, relying on someone to remember, or on a vendor to chase first.
What this post fixes
This post fixes that. Using Gemini and Google Workspace tools you already have, we'll build a two-directional payment reminder system, one that alerts your AP team about invoices approaching their due date before they go overdue, and one that handles outbound communication when your organisation is the one waiting to be paid. This is Post 3 of the Gemini for AP Teams series. By the end of this post, your Google Workspace AP workflow covers invoice arrival, extraction, validation, and payment reminder management end-to-end, without leaving Google.
Two types of reminders, why both matter
Before getting into the prompts, it's worth being clear about the two directions this post covers, because they serve different purposes and go to different audiences.
Inbound AP reminders are internal
They alert your AP team and the relevant budget owner or approver that an invoice in your tracker is approaching its due date and hasn't been paid yet. The goal is to prevent late payments to your vendors. Late payments damage vendor relationships, attract finance charges, and in some industries create compliance risk. Most AP teams manage this manually, someone scans the tracker, spots what's coming due, and chases the approver. Gemini and Apps Script automate that scan and send the alert automatically.
Outbound payment reminders are external
They go from your organisation to a vendor or customer who owes you money, following up on an unpaid invoice, escalating an overdue balance, or requesting payment status. This is traditionally accounts receivable territory, but in practice, many AP teams handle it for smaller amounts or internal intercompany balances. Gemini drafts these communications at scale, professional, appropriately toned, and escalating in firmness as the overdue period extends.
What both types share
They're high-frequency, low-complexity communications that consume a disproportionate amount of AP time when done manually. Gemini handles the drafting. Apps Script handles the triggering. Your team handles the invoice exceptions.
What you need before you start
The AP Invoice Tracker from Post 2. The workflow in this post builds directly on the Google Sheet set up in Post 2, Gmail invoice processing. If you haven't read that post, the minimum you need is a Google Sheet with these columns: Vendor Name, Invoice Number, Invoice Date, Due Date, Amount, Currency, Payment Status, and a column called Days Until Due that you'll add in Step 1.
The other prerequisites
- Gemini in Google Workspace. Same requirement as Posts 1 and 2: Business Standard, Business Plus, or Enterprise plan with Gemini enabled.
- Gmail access. The automated reminder workflow sends emails via Gmail. Your AP team's Gmail account needs to be the one running the Apps Script, since that's the account the emails will send from.
- A payment status convention. Your Payment Status column needs consistent values for the automation to work. Use exactly these four: PENDING, OVERDUE, PAID, ON HOLD. The Apps Script filters on these values, inconsistent naming breaks the logic.
Step 1: Set up your due date tracker in Google Sheets
Before running any prompts, add two calculated columns to your AP Invoice Tracker sheet. The first is a Days Until Due column. In the first empty column after your existing data, add this header and formula:
Header: Days Until Due
Formula (paste in Row 2, drag down):
=IF(H2="PAID", "PAID", IF(H2="ON HOLD", "ON HOLD", DATEDIF(TODAY(), G2, "D")))How to adapt the formula
Replace G2 with your Due Date column reference and H2 with your Payment Status column reference. This formula returns the number of days until the invoice is due for unpaid invoices, and shows PAID or ON HOLD for resolved ones. Negative numbers mean the invoice is already overdue.
Then add a Reminder Status column
Add a second column with the header Reminder Status and a default value of NOT SENT. You'll update this manually or via Apps Script when a reminder goes out, so you don't send duplicate reminders to the same vendor for the same invoice.
Step 2: Generate inbound AP reminders (internal alerts)
Use this prompt weekly, or set up the Apps Script version in the advanced section to run it automatically. Open your AP Invoice Tracker in Google Sheets, open the Gemini side panel, and paste this prompt.
PROMPT 1: Inbound AP Reminders
Analyse the AP Invoice Tracker in this spreadsheet. Identify all invoices where: - Payment Status is PENDING - Days Until Due is between -30 and +7 (i.e. overdue by up to 30 days or due within the next 7 days) For each invoice found, return the following. URGENCY TIER: - CRITICAL: overdue by more than 7 days (Days Until Due is -8 or lower) - HIGH: overdue by 1 to 7 days (Days Until Due is -1 to -7) - MEDIUM: due within 3 days (Days Until Due is 0 to 3) - LOW: due in 4 to 7 days (Days Until Due is 4 to 7) For each invoice return: - Urgency tier - Vendor name - Invoice number - Amount and currency - Due date - Days until due (negative = overdue) - Recommended action (one sentence) Sort results by urgency tier descending, then by amount descending within each tier. Write a summary at the top: - Total invoices requiring attention - Total value at risk - Number in each urgency tier Format the output as a table I can paste into an email to the finance team.
What to do with the output
Copy the table and paste it into a weekly AP status email to your Controller or CFO. This replaces the manual tracker scan that someone on your team is currently doing every Monday morning. The Gemini output is already formatted for an email, vendor names, amounts, urgency tiers, and recommended actions. It takes 30 seconds to copy and send.
Step 3: Draft internal payment escalation emails
For CRITICAL and HIGH urgency invoices, those already overdue, you need to alert the budget owner or approval chain signatory, not just the finance team. Use this prompt to draft those internal escalation emails.
PROMPT 2: Internal Payment Escalation
Draft an internal email to escalate an overdue invoice for payment. Invoice details: - Vendor: [VENDOR NAME] - Invoice number: [NUMBER] - Amount: [AMOUNT] [CURRENCY] - Original due date: [DATE] - Days overdue: [NUMBER] - Approved by: [NAME IF KNOWN] - Budget owner: [NAME IF KNOWN] The email should: - State clearly that this invoice is overdue and by how many days - Note any finance charge risk if payment terms include late payment penalties - Request confirmation of payment release date by end of today - Be addressed to the budget owner or approver - CC the AP team email Tone: direct but professional. Not accusatory, assume administrative oversight, not deliberate delay. Under 100 words in the body. Subject line format: ACTION REQUIRED: Overdue Invoice [NUMBER], [VENDOR], [AMOUNT]
Why the subject line matters
Run this prompt once per CRITICAL or HIGH urgency invoice. The subject line format is intentional, ALL CAPS "ACTION REQUIRED" gets opened faster than a standard subject line when someone's inbox is full. Don't soften it.
Step 4: Draft outbound vendor payment reminders
Now the other direction. These are emails from your organisation to a vendor or customer who owes you money. Gemini drafts them in three tiers of escalating firmness, matching the tone to how overdue the payment actually is.
Tier 1: Friendly reminder (1 to 14 days overdue)
PROMPT 3: Tier 1 — Friendly Reminder
Draft a friendly payment reminder email to a vendor or customer with an overdue invoice. Details: - Recipient name/company: [NAME] - Invoice number: [NUMBER] - Invoice date: [DATE] - Amount due: [AMOUNT] [CURRENCY] - Original due date: [DATE] - Days overdue: [NUMBER] - Your company name: [NAME] - Your AP contact: [NAME AND EMAIL] - Payment methods accepted: [BANK TRANSFER / CARD / OTHER] The email should: - Open warmly, assume this is an oversight - Reference the invoice number and amount clearly - Note the original due date and that payment has not yet been received - Provide payment details or a link to pay - Invite them to contact you if there is a query - Keep a warm, professional tone Subject line: Friendly Reminder: Invoice [NUMBER], Payment Due [DATE] Under 120 words in the body.
Tier 2: Firm follow-up (15 to 30 days overdue)
PROMPT 4: Tier 2 — Firm Follow-Up
Draft a firm payment follow-up email for a significant overdue invoice. Details: - Recipient name/company: [NAME] - Invoice number: [NUMBER] - Invoice date: [DATE] - Amount due: [AMOUNT] [CURRENCY] - Original due date: [DATE] - Days overdue: [NUMBER] - Previous reminder sent: [DATE] - Your company name: [NAME] - Your AP contact: [NAME AND EMAIL] - Late payment terms (if applicable): [TERMS] The email should: - Reference that a previous reminder was sent on [DATE] with no response received - State the amount and overdue period clearly and directly - Note any late payment interest that is now accruing if your terms include this - Request payment or written confirmation of payment date within 5 business days - State that continued non-payment may affect future service or credit terms - Remain professional throughout, no threats, factual statements only Subject line: Second Notice: Invoice [NUMBER] Overdue [NUMBER] Days, Immediate Action Required Under 150 words in the body.
Tier 3: Final notice (30+ days overdue)
PROMPT 5: Tier 3 — Final Notice
Draft a final payment notice for a seriously overdue invoice. Details: - Recipient name/company: [NAME] - Invoice number: [NUMBER] - Invoice date: [DATE] - Original amount due: [AMOUNT] - Late payment interest accrued (if applicable): [AMOUNT] - Total now due: [AMOUNT] [CURRENCY] - Original due date: [DATE] - Days overdue: [NUMBER] - Previous reminders sent: [DATES] - Your company name: [NAME] - Finance Director or senior contact: [NAME] - Your legal or collections position (optional): [e.g. "we reserve the right to refer to a collections agency"] The email should: - Be addressed from a senior finance contact, not the AP team - State this is a final notice before formal action - Summarise the full outstanding balance including any accrued interest - Give a final payment deadline of 5 business days - State the consequence of non-payment clearly but without legal threats, refer to "formal recovery procedures" rather than specific legal action - Request immediate contact if there is a genuine dispute Subject line: FINAL NOTICE: Invoice [NUMBER], [AMOUNT], [COMPANY NAME] Under 180 words. Formal register throughout. No warmth, professional distance.
A note on tone escalation
The three tiers are deliberately calibrated. Tier 1 assumes an honest oversight. Tier 2 signals consequence without aggression. Tier 3 is formal and senior. Using Tier 3 tone for a 5-day overdue invoice damages the vendor relationship without cause. Using Tier 1 tone for a 45-day overdue invoice signals that non-payment has no consequence. Match the tier to the actual overdue period every time.
Step 5: Batch draft reminders from your tracker
For weeks where you have multiple reminders to send, use this prompt to generate all of them at once from your AP Invoice Tracker rather than running them one by one.
PROMPT 6: Batch Reminder Generation
Look at the AP Invoice Tracker in this spreadsheet. For all invoices where: - Payment Status is PENDING or OVERDUE - Reminder Status is NOT SENT - Days Until Due is -1 or lower (i.e. already past due date) Draft a payment reminder email for each invoice. Use the following tier logic: - Days overdue 1 to 14: Tier 1 friendly reminder - Days overdue 15 to 30: Tier 2 firm follow-up - Days overdue 30+: Tier 3 final notice For each email return: - Vendor name - Invoice number - Days overdue - Tier assigned - Full email draft (subject line + body) Separate each email draft with a clear divider line. After all drafts, return a summary table: - Total emails drafted - Breakdown by tier - Total value represented I will review each draft before sending.
Why "I will review" matters in the prompt
This prompt does in two minutes what would otherwise take an AP team member the better part of a morning. The "I will review each draft before sending" instruction at the end is not just politeness, it tells Gemini that human review is happening, which produces more conservative, carefully worded output than an instruction that implies automated sending.
Step 6: Log sent reminders back to the tracker
After sending any reminder, update your tracker. Use this prompt to generate the log entry text quickly.
PROMPT 7: Reminder Log Entry
Generate a reminder log entry for the following sent communication: - Vendor: [NAME] - Invoice number: [NUMBER] - Reminder tier sent: [1 / 2 / 3] - Date sent: [DATE] - Sent by: [YOUR NAME] - Sent to: [RECIPIENT EMAIL] - Response received: [YES / NO / PENDING] - Next action required: [DATE AND ACTION IF ANY] Format as a single line suitable for pasting into a spreadsheet row: [DATE] | [VENDOR] | [INV NUMBER] | [TIER] | [SENT BY] | [RECIPIENT] | [RESPONSE STATUS] | [NEXT ACTION]
Why the log matters
Paste this into a Reminder Log sheet in your AP Invoice Tracker workbook. Over time, this log becomes a communication audit trail, showing every reminder sent, to whom, when, and what response was received. If a vendor disputes a late payment charge and claims they never received a reminder, the log is your evidence. It also becomes a useful signal for vendor risk over time, vendors who consistently respond late to reminders show up in the data.
Advanced: automating reminders with Google Apps Script
This section is for finance ops leads or IT administrators who want the reminder system to run automatically without anyone manually running prompts. If you're happy running the Gemini prompts each week manually, skip this. The script below runs daily, checks your AP Invoice Tracker for invoices approaching or past their due date, and sends reminder emails automatically, using the same tier logic as the manual prompts above.
Before running this script
Set up the AP Invoice Tracker sheet with the column structure from Posts 1 and 2. Make sure the Payment Status column uses exactly: PENDING, OVERDUE, PAID, ON HOLD. Add the Days Until Due formula from Step 1. Add a Reminder Log sheet to the same workbook.
The Apps Script
In Google Sheets, go to Extensions → Apps Script. Paste this script:
function sendPaymentReminders() {
const SHEET_NAME = 'AP Invoice Tracker';
const LOG_SHEET = 'Reminder Log';
const AP_EMAIL = 'ap@yourcompany.com'; // Your AP team email
const FINANCE_DIRECTOR = 'fd@yourcompany.com'; // For Tier 3
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheetByName(SHEET_NAME);
const logSheet = ss.getSheetByName(LOG_SHEET);
const data = sheet.getDataRange().getValues();
const headers = data[0];
// Map column indices, adjust these to match
// your actual column order
const COL = {
vendor: headers.indexOf('Vendor Name'),
invoiceNum: headers.indexOf('Invoice Number'),
amount: headers.indexOf('Amount'),
currency: headers.indexOf('Currency'),
dueDate: headers.indexOf('Due Date'),
status: headers.indexOf('Payment Status'),
daysUntilDue: headers.indexOf('Days Until Due'),
reminderStatus: headers.indexOf('Reminder Status'),
vendorEmail: headers.indexOf('Vendor Email')
};
const today = new Date();
let remindersSent = 0;
// Loop through all invoice rows
for (let i = 1; i < data.length; i++) {
const row = data[i];
const status = row[COL.status];
const reminderStatus = row[COL.reminderStatus];
const daysUntilDue = parseInt(row[COL.daysUntilDue]);
const vendor = row[COL.vendor];
const invoiceNum = row[COL.invoiceNum];
const amount = row[COL.amount];
const currency = row[COL.currency];
const dueDate = row[COL.dueDate];
const vendorEmail = row[COL.vendorEmail];
// Skip paid, on hold, or already reminded today
if (status === 'PAID' ||
status === 'ON HOLD' ||
reminderStatus === 'SENT TODAY') continue;
// Determine if a reminder is needed
let tier = null;
let subject = '';
let body = '';
if (isNaN(daysUntilDue)) continue;
const daysOverdue = daysUntilDue * -1;
// Only act on overdue invoices
if (daysOverdue < 1) continue;
// Assign tier based on days overdue
if (daysOverdue >= 1 && daysOverdue <= 14) {
tier = 1;
subject = `Friendly Reminder, Invoice ${invoiceNum}, Payment Due`;
body = `Dear ${vendor},\n\nThis is a friendly reminder that invoice ${invoiceNum} for ${currency} ${amount}, due on ${dueDate}, has not yet been received.\n\nPlease arrange payment at your earliest convenience or contact us if you have any queries.\n\nKind regards,\nAP Team`;
} else if (daysOverdue >= 15 && daysOverdue <= 30) {
tier = 2;
subject = `Second Notice, Invoice ${invoiceNum} Overdue ${daysOverdue} Days`;
body = `Dear ${vendor},\n\nDespite our earlier reminder, invoice ${invoiceNum} for ${currency} ${amount}, originally due on ${dueDate}, remains unpaid, now ${daysOverdue} days overdue.\n\nPlease arrange payment or confirm a payment date within 5 business days. Continued non-payment may affect future credit terms.\n\nRegards,\nAP Team`;
} else if (daysOverdue > 30) {
tier = 3;
subject = `FINAL NOTICE, Invoice ${invoiceNum}, ${currency} ${amount}, ${vendor}`;
body = `Dear ${vendor},\n\nThis is a final notice regarding invoice ${invoiceNum} for ${currency} ${amount}, now ${daysOverdue} days overdue.\n\nImmediate payment is required within 5 business days. Failure to respond will result in formal recovery procedures being initiated.\n\nPlease contact us immediately if there is a dispute.\n\nFormal regards,\nFinance Director`;
}
// Send the reminder if a tier was assigned
if (tier && vendorEmail) {
try {
GmailApp.sendEmail(
vendorEmail,
subject,
body,
{
from: tier === 3 ? FINANCE_DIRECTOR : AP_EMAIL,
cc: AP_EMAIL
}
);
// Update reminder status in sheet
sheet.getRange(i + 1, COL.reminderStatus + 1)
.setValue('SENT TODAY');
// Log the reminder
logSheet.appendRow([
today, vendor, invoiceNum,
amount, currency, dueDate,
daysOverdue, `Tier ${tier}`,
vendorEmail, 'SENT', ''
]);
remindersSent++;
} catch(e) {
Logger.log(`Error sending to ${vendor}: ${e.toString()}`);
logSheet.appendRow([
today, vendor, invoiceNum,
amount, currency, dueDate,
daysOverdue, `Tier ${tier}`,
vendorEmail, 'FAILED', e.toString()
]);
}
}
}
// Send daily summary to AP team
if (remindersSent > 0) {
GmailApp.sendEmail(
AP_EMAIL,
`AP Reminder Summary, ${today.toDateString()}, ${remindersSent} sent`,
`The automated AP reminder system sent ${remindersSent} payment reminders today. Review the Reminder Log sheet for details.`
);
}
Logger.log(`Done. ${remindersSent} reminders sent.`);
}
// Set up daily trigger
function createDailyTrigger() {
ScriptApp.newTrigger('sendPaymentReminders')
.timeBased()
.everyDays(1)
.atHour(8)
.create();
}To activate
Save the script. Run createDailyTrigger once. From tomorrow morning at 8am, the script checks your tracker daily, sends the appropriate tier reminder to any overdue vendor, logs every communication, and sends your AP team a daily summary of what went out.
Two important notes before activating
- Review the email body text before activating. The script uses simplified versions of the full Gemini-drafted templates, for a production deployment, replace the body text with the full prompt outputs from Steps 3 and 4, hardcoded for your organisation's voice and terms.
- Add a vendorEmail column to your AP Invoice Tracker if it isn't already there. The script reads vendor email addresses from this column to send outbound reminders. Without it, the script logs the attempt as failed rather than sending blindly to the wrong address.
The complete Google Workspace AP workflow: Posts 1 to 3
Here's where the series stands after three posts:
- Invoice arrives in Gmail.
- Gmail filter labels it AP-Invoices.
- Post 2 Apps Script logs it to AP Invoice Tracker.
- Gemini extracts and validates the invoice data.
- Extracted data added to tracker.
- Invoice sits in the tracker.
- Post 1 spend analysis prompts run monthly on the full dataset.
- Post 3 Apps Script runs daily, checks due dates, sends reminders.
- Internal escalation emails go to budget owners for overdue items.
- Outbound reminders go to vendors who owe you money.
- Reminder Log maintains a full communication audit trail.
- CFO gets weekly AP status summary and monthly spend analysis.
- Full AP visibility, inbox to insight to action, in Google Workspace.
Where this workflow stops, and Blackbee AI picks up
The three-post workflow you now have, invoice extraction, validation, and automated payment reminders, covers a significant portion of what AP teams spend their time on. What it doesn't cover is everything that happens before the invoice arrives, the purchase intent, the vendor commitment, the contract terms that should govern what you're being billed, and the approval chain that should have signed off before any spend was committed. When those upstream controls are missing, the downstream reminder system is managing the consequences of an uncontrolled process rather than preventing them. Blackbee AI governs that upstream process, from the moment a spend need is identified through to payment release, so that by the time an invoice arrives, the amount, the vendor, and the timing are already expected, validated, and approved. If your team is ready to close that upstream gap, see how the full Intake-to-Pay platform works.