How to Automate Invoice Reminders with OpenClaw
Chasing late payments is one of the worst parts of running a business. You send an invoice, wait, send a "friendly reminder," wait more, then send an increasingly awkward sequence of follow-ups while trying to maintain the relationship. It's time-consuming, uncomfortable, and entirely automatable.
This guide walks you through setting up an OpenClaw agent that monitors your invoices and automatically sends polite, escalating payment reminders. No more spreadsheet tracking. No more "just following up" emails at 11 PM. The agent handles the awkward part so you can focus on the actual work.
What You'll Build
By the end of this guide, you'll have an agent that:
- Monitors a list of outstanding invoices (from a CSV, Google Sheet, or API)
- Sends a friendly reminder 3 days after the due date
- Escalates to a firmer tone at 7 days overdue
- Sends a final notice at 14 days with next steps
- Notifies you in Telegram/Discord when payments come in or when manual intervention is needed
Prerequisites
- OpenClaw installed and running (
openclaw gateway statusshould return "running") - An email account the agent can send from (SMTP credentials)
- Your invoice data in a parseable format (CSV works fine to start)
Step 1: Create the Agent Configuration
Every OpenClaw agent starts with a configuration file. Create a new directory for your invoice agent and add the core config:
~/.openclaw/agents/invoice-chaser/agent.yamlname: invoice-chaser
description: Monitors invoices and sends escalating payment reminders
model: anthropic/claude-sonnet-4-20250514
schedule:
- cron: "0 9 * * 1-5" # Check every weekday at 9 AM
task: check_overdue_invoices
capabilities:
- email
- web_fetch
- file_read
env:
SMTP_HOST: smtp.yourprovider.com
SMTP_PORT: 587
SMTP_USER: [email protected]
INVOICE_SOURCE: /path/to/invoices.csv
claude-sonnet-4-20250514 for this agent. It's cheaper than Opus and more than capable for email drafting and CSV parsing. You'll save significantly on token costs for a task that runs daily.
Step 2: Set Up the Invoice Data Source
The simplest starting point is a CSV file. Your agent needs to know: who owes what, when it was due, and how to contact them.
invoices.csvinvoice_id,client_name,client_email,amount,currency,due_date,status
INV-001,Acme Corp,[email protected],2500.00,USD,2026-02-01,overdue
INV-002,Beta LLC,[email protected],1200.00,USD,2026-02-10,pending
INV-003,Gamma Inc,[email protected],800.00,USD,2026-01-15,overdue
For production use, you'll want to connect to your actual invoicing system. The agent can pull data from:
- Stripe API β fetch invoices with
web_fetchusing your API key - Google Sheets β export as CSV or use the Sheets API
- Xero / QuickBooks / FreshBooks β API integrations via webhook or direct fetch
Step 3: Define the Reminder Templates
The agent's personality matters here. You want firmness without burning bridges. Create a SOUL.md that defines behavior:
~/.openclaw/agents/invoice-chaser/SOUL.md# Invoice Chaser
You manage payment reminders for outstanding invoices.
## Tone
- Day 3 overdue: Friendly and helpful. "Just a quick reminder..."
- Day 7 overdue: Professional and clear. State the amount and due date directly.
- Day 14 overdue: Firm but respectful. Mention next steps (late fees, collections).
- Never be rude, threatening, or passive-aggressive.
## Rules
- Always include the invoice number, amount, and original due date
- Include a payment link if available
- CC the business owner on day 14+ emails
- Log every sent reminder to the daily memory file
- If a payment is confirmed, update status and send a thank-you
Step 4: The Reminder Logic
Create a skill that the agent runs on its cron schedule. This is the core logic:
~/.openclaw/agents/invoice-chaser/skills/check-overdue/SKILL.md# Check Overdue Invoices
1. Read the invoice source (CSV or API)
2. For each invoice where status != "paid":
a. Calculate days_overdue = today - due_date
b. Check memory for last reminder sent date
c. If days_overdue >= 3 and no reminder sent β send gentle reminder
d. If days_overdue >= 7 and only gentle sent β send firm reminder
e. If days_overdue >= 14 and no final notice β send final notice + notify owner
3. Log all actions to memory/YYYY-MM-DD.md
4. Report summary to owner via Telegram
Step 5: Configure Email Sending
Your agent needs SMTP access. Set up the environment variables securely:
# Add to your .env file (never commit this)
SMTP_HOST=smtp.fastmail.com
SMTP_PORT=587
[email protected]
SMTP_PASS=your-app-specific-password
The agent will use OpenClaw's email capability to send messages through your SMTP server. Each email is logged, so you have a complete audit trail.
Step 6: Test Before Going Live
Don't send real reminders on your first run. Add a dry-run flag:
# Test the agent manually
openclaw run invoice-chaser --task check_overdue_invoices
# Check what it would have sent
cat ~/.openclaw/agents/invoice-chaser/memory/$(date +%F).md
Review the generated emails carefully. Adjust the tone in SOUL.md until it matches your voice. The goal is that clients should think you wrote each reminder.
What to Expect
In practice, most businesses see:
- 30-40% of overdue invoices get paid after the first gentle reminder
- Another 25-30% come in after the 7-day follow-up
- Total time saved: 2-4 hours per week for businesses with 20+ active invoices
- Faster average payment: 11 days faster than manual follow-up (because the agent never forgets or procrastinates)
The consistency is the key advantage. Humans forget, delay, or feel awkward sending a third reminder. The agent sends it at exactly the right time, every time.
Common Pitfalls
- Don't over-remind. Once per escalation tier is enough. More than that damages relationships.
- Always include opt-out language if required by your jurisdiction.
- Monitor the agent's memory logs weekly to catch edge cases (duplicate sends, wrong amounts).
- Set up a "pause" list for clients you're in active disputes withβyou don't want automated emails complicating negotiations.
Skip the Setup β Get Invoice Chaser
Don't want to build it from scratch? Invoice Chaser is a pre-configured OpenClaw agent with multi-source integrations (Stripe, CSV, Sheets), professional email templates, Telegram/Discord notifications, and a payment tracking dashboard. Install in 5 minutes.
$29
One-time purchase Β· Unlimited invoices Β· 30-day money-back guarantee
Get Invoice Chaser β