Overdue invoice chaser with tiered reminder emails: run the example workflow in n8n

The agent picks out unpaid invoices by age and sends reminder emails that get firmer over time. It logs replies and lists disputed invoices for the owner, who approves the wording of any final notice.

Approval gate: the owner approves every reminder before it is queued (approved=true); nothing is released without it, final notices included. Invoices with an unreadable or impossible date go to a review queue and are never given a tier.

Download the workflow (JSON) Download the sample input Back to the use case

1. Set up n8n once

Follow the setup guide: start n8n on your own computer, import the file, and press Publish.

2. Send the sample input

Save the sample input next to where you run the command, and use the Production URL path twwp-overdue-invoice-chaser-0887:

curl -X POST -H "Content-Type: application/json" --data-binary @overdue-invoice-chaser-0887-sample-input.json http://localhost:5678/webhook/twwp-overdue-invoice-chaser-0887

Sample input:

{
 "today": "2026-11-26",
 "approved": false,
 "invoices": [
  {
   "id": "INV-1001",
   "customer": "Bright Bakery",
   "amount": 420.0,
   "due": "2026-11-20",
   "status": "open"
  },
  {
   "id": "INV-1002",
   "customer": "Harbour Print",
   "amount": 1180.5,
   "due": "2026-11-01",
   "status": "open"
  },
  {
   "id": "INV-1003",
   "customer": "Old Mill Cafe",
   "amount": 260.0,
   "due": "2026-10-10",
   "status": "open"
  },
  {
   "id": "INV-1004",
   "customer": "Studio Nine",
   "amount": 900.0,
   "due": "2026-10-01",
   "status": "disputed"
  },
  {
   "id": "INV-1005",
   "customer": "Green Door",
   "amount": 75.0,
   "due": "2026-10-05",
   "status": "paid"
  },
  {
   "id": "INV-1006",
   "customer": "Corner Shop",
   "amount": 310.0,
   "due": "2026-12-05",
   "status": "open"
  }
 ]
}

3. What you should see

With the gate closed (default):

{
 "status": "held_for_approval",
 "held_for_owner": [
  "INV-1003"
 ],
 "drafts": [
  {
   "invoice": "INV-1001",
   "customer": "Bright Bakery",
   "amount": 420.0,
   "days_overdue": 6,
   "tier": "friendly",
   "subject": "Friendly reminder: invoice INV-1001"
  },
  {
   "invoice": "INV-1002",
   "customer": "Harbour Print",
   "amount": 1180.5,
   "days_overdue": 25,
   "tier": "firm",
   "subject": "Reminder: invoice INV-1002 is overdue"
  },
  {
   "invoice": "INV-1003",
   "customer": "Old Mill Cafe",
   "amount": 260.0,
   "days_overdue": 47,
   "tier": "final",
   "subject": "Final notice: invoice INV-1003"
  }
 ],
 "call_the_customer": [
  "INV-1004"
 ],
 "review_queue": []
}

With the gate open (regression_unreadable_date_approved), after changing the input as in the test file:

{
 "status": "drafts_ready",
 "queued_local": [
  "INV-2005"
 ],
 "drafts": [
  {
   "invoice": "INV-2005",
   "customer": "E",
   "amount": 50.0,
   "days_overdue": 6,
   "tier": "friendly",
   "subject": "Friendly reminder: invoice INV-2005"
  }
 ],
 "call_the_customer": [],
 "review_queue": [
  "INV-2001",
  "INV-2002",
  "INV-2003",
  "INV-2004"
 ]
}

All 4 test cases, with their inputs and answers, are in the test file. The AI step is a simple stand-in, so the answer is the same every time. See the setup guide for how to swap in a real AI and what it costs.