How to send overdue invoice reminders with an AI agent that adjusts its tone (n8n)
The problem
Chasing late payments is awkward. Reminders should be gentle for a few days overdue and firmer after weeks, and nobody wants to write each one.
Tools needed
- n8n (self-hosted in Docker in the source)
- Gemini (gemini-2.0-flash-lite)
- n8n Data Table
- Gmail SMTP
Step-by-step recipe
- Keep invoices in an n8n Data Table: client, email, amount, due date, balance, status.
- Create a chat-triggered AI agent with simple memory and two tools: one that reads the invoices table and one that sends email.
- In the system prompt, tell it to select invoices that are past due, have a positive balance and are Pending, and to skip ones already Reminded.
- Have it soften or firm up the tone depending on how many days overdue each invoice is.
- Return a JSON summary of the emails sent.
Copyable prompt
You write payment reminders for [COMPANY]. For each invoice provided, write a short email to the client.
Tone by days overdue: 1-7 friendly reminder; 8-30 polite but clear, restate amount and due date; 31+ firm, mention next steps [NEXT STEPS].
Always include invoice number, amount, due date and how to pay: [PAYMENT DETAILS]. Never threaten, never add fees that are not in our terms.
Return JSON: [{"invoice": "...", "to": "...", "subject": "...", "body": "..."}]Original template written by AgentRecipes, not copied from the source. Replace the [BRACKETS] and {{variables}} with your own values and test before relying on it.
What the builder reported
The source describes a finished workflow that runs from a single chat command. It reports no test results or example outputs.
These are the source author's own claims. AgentRecipes has not tested or verified them.
Watch out for
- Gmail SMTP sending needs an app password.
- The source doesn't update the status to Reminded after sending; add that step or clients will get duplicate reminders.
- The agent filters rows itself from a full-table fetch; for larger tables, filter in a normal node first.
Source
Original write-up: DEV Community ↗
Found via Agent Use Cases: “Send tone-adjusted overdue invoice reminders”. This recipe summarises the source in our own words; read the original for the full details. Link last checked 2026-10-15.
More finance & invoicing recipes
New agent recipes in your inbox
A short email with the newest automation recipes, each linked to its real-world source. No spam, unsubscribe anytime.