ERPNext logo ERPNext automation · runs weekly

Report overdue ERPNext invoices every week

Overdue invoices sit in ERPNext until someone looks. On Monday you filter the Sales Invoice list on status, open the worst ones to see what the customer last paid, and write the same reminder again.

Cotlet does it in your own ERPNext account with list_overdue_invoices, get_sales_invoice and list_payment_entries, called by your AI agent, an n8n workflow or a script.

Hosted · nothing to install or maintain

Can ERPNext do this on its own?

ERPNext shows overdue invoices in the Sales Invoice list and in the Accounts Receivable report (checked 14 Oct 2026). The Accounts Receivable page describes a report you open and refresh yourself, with no scheduled summary, and points to a statement or a Dunning record for follow-up. Nothing there writes the reminder or looks at the customer's payment history for you.

How you do it in ERPNext today

  1. Open Accounting > Sales and Receivables > Sales Invoice and filter the list on the Overdue status.
  2. Or open the Accounts Receivable report, pick the Company and the reporting date, and choose whether ageing is based on Due Date or Posting Date.
  3. Open the larger invoices one by one to read the customer, the due date and the outstanding amount.
  4. Check the customer's earlier Payment Entries to see whether they usually pay late or have paid part of it.
  5. Follow up outside ERPNext by email, send a statement or create a Dunning record, then come back next week and repeat.

How to report overdue ERPNext invoices every week

Prompt

Every Monday, list the sales invoices that are more than 7 days overdue, oldest first. Add the last payment on each customer and write me a short reminder draft per customer. Do not send anything.
  1. 01

    Pull the overdue set

    list_overdue_invoices returns invoices with the Overdue status and the days past the due date. The agent applies your threshold from the prompt, so a week-old invoice that is not yet worth a reminder is left out.

  2. 02

    Group by customer

    Three overdue invoices from one customer become one line with the total and the oldest due date. The reminder goes out once per customer, not once per invoice.

  3. 03

    Add the payment history

    For each customer on the list the agent reads list_payment_entries and notes the last payment date and amount. A customer who paid three days ago is flagged, because the new payment may not be allocated yet.

  4. 04

    Open only the invoices that need detail

    get_sales_invoice runs for the largest balance per customer to read the items and the Payment Due Date. The agent quotes the invoice ID in each reminder.

  5. 05

    Write drafts, send nothing

    You get a short reminder per customer in your own words from the prompt. Sending stays with you, and the agent changes nothing in ERPNext.

What you get back

Example data

Overdue more than 7 days: 3 invoices, 2,500.00 USD
1. Harbor & Pine: ACC-SINV-2026-00031, 800.00, due 2026-09-20, 24 days. Last payment 2026-08-30, 880.00
2. Lumen Dental: ACC-SINV-2026-00036, 450.00, due 2026-10-01, 13 days. Last payment 2026-10-12, 200.00 (check allocation)
3. Kestrel Logistics: ACC-SINV-2026-00039, 1,250.00, due 2026-10-05, 9 days. No payment on file
Reminder drafts: 3

Other ways to ask

  • Only list customers whose overdue total is above 1,000 and add the credit note count.
  • Run on the 1st and 15th and compare with the previous report: what is new, what got paid.
  • Skip invoices where the customer paid anything in the last 5 days.
  • Give me the overdue total per Customer Group and nothing else.

What ERPNext allows, and what to know first

  • ERPNext marks an invoice Overdue when it is past its due date and a balance remains.
  • The Payment Due Date on the invoice, not the Posting Date, decides whether it is overdue.
  • The Accounts Receivable report can age invoices by Due Date or by Posting Date, so its buckets can differ from the Overdue list.
  • Credit Note Issued is a separate status, so an invoice with a return against it is not the same as a plain overdue one.
  • The Accounts Receivable page points to a Dunning record or a statement for follow-up on overdue customer invoices.

Every tool here only reads, so it can run weekly from n8n, Make, Zapier or cron without waiting for your OK.

Sources: ERPNext Docs: Sales Invoice · ERPNext Docs: Accounts Receivable · ERPNext Docs: Payment Entry

Call list_overdue_invoices from a script

curl

curl "https://cotlet.dev/api/v1/erpnext/overdue-invoices?min_days_overdue=7&limit=50" \
  -H "Authorization: Bearer $COTLET_API_KEY"

Example response

{
  "as_of": "2026-10-14",
  "invoices": [
    {
      "invoice": "ACC-SINV-2026-00031",
      "customer": "Harbor & Pine",
      "due_date": "2026-09-20",
      "days_overdue": 24,
      "currency": "USD",
      "outstanding_amount": 800
    },
    {
      "invoice": "ACC-SINV-2026-00036",
      "customer": "Lumen Dental",
      "due_date": "2026-10-01",
      "days_overdue": 13,
      "currency": "USD",
      "outstanding_amount": 450
    },
    {
      "invoice": "ACC-SINV-2026-00039",
      "customer": "Kestrel Logistics",
      "due_date": "2026-10-05",
      "days_overdue": 9,
      "currency": "USD",
      "outstanding_amount": 1250
    }
  ],
  "total_outstanding": 2500,
  "next_cursor": null
}

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is erpnext_read → list_overdue_invoices. Example data.

Schedule it in n8n, Make, Zapier or cron

ERPNext tools this automation uses

Cotlet ERPNext tools used to report overdue ERPNext invoices every week
Tool Parameters
list_overdue_invoices customer, min_days_overdue, limit, cursor
get_sales_invoice invoice
list_payment_entries party, payment_type, state, from_date, to_date, limit, cursor
All 13 ERPNext tools with descriptions

Frequently asked questions

Is it safe to connect ERPNext to Cotlet?

Yes. You sign in to ERPNext yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get ERPNext once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

Give your agent access to ERPNext.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with ERPNext.