Chase Invoices Without Chasing Your Tail

AI tracks overdue invoices and drafts professional follow-ups with attached invoices. Your finance team reviews before sending.


Why this matters

Accounts receivable teams spend hours manually tracking overdue invoices and sending follow-up emails. The follow-up cadence is inconsistent — some invoices get chased aggressively while others fall through the cracks. When follow-ups are sent, they're often missing the invoice attachment or key details, requiring additional back-and-forth with the client.


How MultiMail solves this

MultiMail's AI agent monitors your accounts receivable and drafts professional follow-up emails for overdue invoices. Each follow-up includes the original invoice, payment instructions, and messaging that escalates progressively. Gated_send oversight lets your finance team review messaging that could affect client relationships before delivery.

1

Detect Overdue Invoices

Your AI agent monitors your billing system for invoices that pass their due date without payment. It calculates days overdue and selects the appropriate follow-up tier.

2

Check Payment History

The agent reviews the client's payment history using search_contacts to determine if this is a first-time issue or a pattern, adjusting the follow-up tone accordingly.

3

Draft Follow-Up with Invoice

The agent composes a professional follow-up email, attaches the original invoice, and includes clear payment instructions and direct payment links.

4

Finance Reviews and Sends

Under gated_send, the follow-up enters the approval queue. Your finance team verifies the details and approves delivery, maintaining control over client communications.


Implementation

Track and Follow Up Overdue Invoices
python
import requests
from datetime import datetime

API = "https://api.multimail.dev/v1"
HEADERS = {"Authorization": "Bearer mm_live_xxx"}

def process_overdue_invoices(invoices: list):
    today = datetime.utcnow().date()

    for inv in invoices:
        if inv["status"] == "paid":
            continue

        days_overdue = (today - inv["due_date"]).days
        if days_overdue <= 0:
            continue

        "cm"># Check client payment history
        contact = requests.get(
            f"{API}/contacts/search",
            headers=HEADERS,
            params={"email": inv["contact_email"]}
        ).json()

        tone = select_tone(days_overdue, contact)
        body = draft_follow_up(inv, tone, days_overdue)

        requests.post(
            f"{API}/send",
            headers=HEADERS,
            json={
                "from": "[email protected]",
                "to": inv["contact_email"],
                "subject": f"Invoice "cm">#{inv['number']} is {days_overdue} days past due - ${inv['amount']:,.2f}",
                "text_body": body,
                "html_body": build_follow_up_html(inv, tone)
            }
        )

Identify overdue invoices and draft appropriate follow-up emails.

Progressive Follow-Up Logic
python
def select_tone(days_overdue: int, contact: dict) -> str:
    has_good_history = contact.get("metadata", {}).get(
        "on_time_rate", 1.0
    ) > 0.8

    if days_overdue <= 7:
        return "gentle" if has_good_history else "firm"
    elif days_overdue <= 15:
        return "firm"
    elif days_overdue <= 30:
        return "urgent"
    else:
        return "final"

def draft_follow_up(inv: dict, tone: str, days: int) -> str:
    templates = {
        "gentle": (
            f"Hi {inv[&"cm">#039;contact_name']},\n\n"
            f"I hope this finds you well. I wanted to follow up on "
            f"invoice "cm">#{inv['number']} for ${inv['amount']:,.2f}, which "
            f"was due on {inv[&"cm">#039;due_date']}. Please let us know if you "
            f"need anything to process the payment.\n\n"
            f"Payment link: {inv[&"cm">#039;payment_url']}"
        ),
        "urgent": (
            f"Dear {inv[&"cm">#039;contact_name']},\n\n"
            f"Invoice "cm">#{inv['number']} for ${inv['amount']:,.2f} is now "
            f"{days} days past due. We kindly request immediate payment "
            f"to avoid any impact to your account.\n\n"
            f"Payment link: {inv[&"cm">#039;payment_url']}\n\n"
            f"If there are any issues with this invoice, please reply "
            f"so we can resolve them promptly."
        )
    }
    return templates.get(tone, templates["gentle"])

Select tone and content based on days overdue and payment history.

MCP Tool Integration
typescript
"cm">// Using MultiMail MCP tools for invoice follow-up

async function followUpOverdueInvoice(invoice: Invoice) {
  const daysOverdue = daysBetween(invoice.dueDate, new Date());
  if (daysOverdue <= 0) return;

  "cm">// Check client payment history
  const contacts = await mcp.search_contacts({
    query: invoice.contactEmail
  });

  const tone = selectTone(daysOverdue, contacts[0]);

  "cm">// Send follow-up (queued for finance review)
  await mcp.send_email({
    to: invoice.contactEmail,
    subject: `Invoice #${invoice.number} is ${daysOverdue} days past due`,
    text_body: draftFollowUp(invoice, tone, daysOverdue)
  });

  "cm">// Tag for tracking
  await mcp.add_contact({
    email: invoice.contactEmail,
    metadata: {
      last_followup_date: new Date().toISOString(),
      followup_count: (contacts[0]?.metadata?.followup_count || 0) + 1
    }
  });
}

Manage invoice follow-ups using MultiMail MCP tools.


What you get

Consistent Follow-Up Cadence

Every overdue invoice gets followed up on schedule. No more invoices falling through the cracks because someone was on vacation or too busy.

Client-Relationship Aware

The AI adjusts tone based on payment history and relationship length. Long-standing clients with good track records get gentler reminders than chronically late payers.

Complete Documentation

Every follow-up includes the original invoice, payment instructions, and a direct payment link. Clients never have to ask for the invoice to be resent.

Human Review on Sensitive Messages

Gated send keeps your finance team in control of client communications. They review tone and content before delivery, preventing messages that could damage relationships.


Recommended oversight mode

Recommended
gated_send
Invoice follow-ups affect client relationships and cash flow. An overly aggressive tone can damage a relationship; an overly gentle tone may not get results. Gated send lets the AI handle the tracking and drafting while your finance team controls the messaging.

Common questions

At what point should I escalate from follow-up to collection?
Typically, invoice follow-ups cover the first 30-60 days past due. Beyond that, consider the collection-notices use case, which includes required FDCPA disclosures and uses gated_all oversight for legal compliance. The transition point depends on your industry, relationship, and invoice amount.
Can the AI attach the original invoice PDF?
Yes. Your AI agent can retrieve the invoice document from your billing system and include it as an attachment via the MultiMail API. The attachment is visible during the gated_send review so your team can verify the correct invoice is attached.
How do I handle partial payments?
Your agent checks the current balance before sending a follow-up. If a partial payment has been received, the follow-up references the remaining balance rather than the original amount. This prevents confusing the client with incorrect amounts.
Can I CC the account manager on follow-ups?
Yes. Your agent can CC the client's account manager or sales rep on follow-up emails so they're aware of payment issues. This is especially useful for large accounts where the sales relationship matters. Configure CC recipients by account tier or amount threshold.

Explore more use cases

The only agent email with a verifiable sender

Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.