# Daily NetSuite collections digest in Slack with email drafts

> Every weekday at 8am, see your total overdue balance ranked by account in Slack, with polite reminder emails waiting as drafts in Gmail.

- Workflow type: agent
- Services: NetSuite, Slack Bot, Gmail
- Categories: Finance, Operations
- Published: 2026-08-07

## What it does

- Pulls every open invoice past its due date from NetSuite each weekday morning and groups them by how late they are: 1 to 30 days, 31 to 60, 61 to 90, and over 90.
- Posts one ranked Slack message that leads with your total balance at risk and how it moved since last week, then lists the top 10 accounts with their oldest invoice number and days late.
- Prepares a polite but firm reminder email as a Gmail draft for any account over $10,000 overdue or more than 60 days late, naming the exact invoice numbers and amounts.
- Leaves every email as a draft for a person to review and send, and skips customers already flagged as in dispute or on a payment plan.

## What you'll need

- A NetSuite account with permission to read invoices and customer records
- A Slack workspace and the channel your collections team watches
- A Gmail account that the reminder emails should be drafted from
- Billing contact email addresses filled in on your NetSuite customer records
- A way to tell which customers are in dispute or on a payment plan, such as a field on the customer record

## Prompt

Every weekday at 8am, run an accounts receivable collections review in NetSuite and report it to our collections channel in Slack.

Start by running a SuiteQL query in NetSuite that returns every open invoice whose due date has already passed. For each invoice pull the invoice number, the customer, the invoice date, the due date, the original amount, and the remaining balance due, then calculate how many days late it is relative to today. SuiteQL returns a maximum of 1000 rows per page, so page through the results using limit and offset until you have the complete ledger. NetSuite money fields are plain decimal amounts in the record currency, so there is no cents or minor unit conversion to do. Always count the unpaid remaining balance, not the original invoice total.

Bucket every overdue invoice by how late it is: 1 to 30 days, 31 to 60 days, 61 to 90 days, and more than 90 days. Then roll the invoices up per customer, so each customer has a total overdue balance, a breakdown across those four buckets, the oldest open invoice with its number and days late, and a count of open overdue invoices. Rank the customers by total overdue balance.

Skip any customer already flagged as in dispute or on a payment plan. Check the customer record for a dispute or payment plan indicator, which is usually a custom field or a status or category on the record, and drop those customers entirely from both the ranking and the email drafting step. If the account does not carry such a field, treat every customer as eligible and say so in the Slack message so the team knows that filter did not apply.

For the worst offenders, meaning the top 10 by overdue balance plus any customer that qualifies for a dunning draft, get the customer record in NetSuite to read the account owner, which is the sales rep on the record, and the billing contact's email address. Do not fetch the full record for every customer in the ledger, only the ones being reported on or written to.

Post one message to our collections channel in Slack. Lead with the headline number: total AR at risk across all overdue invoices, and the change versus last week. Record this week's total so the next run can calculate that change, and on the very first run say that the run is establishing the baseline. Under the headline show the totals in each aging bucket, then a ranked list of the top 10 accounts by overdue balance. For each account give the customer name, the total overdue, the oldest invoice number, how many days late that invoice is, which aging bucket it falls in, and the account owner so it is clear who should chase it. Keep it to a single message and prioritize rather than dumping the whole ledger, so the accounts that need personal attention stand out instead of being buried in a list of everything overdue.

For any account with more than $10,000 overdue, or with any invoice more than 60 days late, create a draft in Gmail of a dunning email addressed to that customer's billing contact. The tone should be polite but firm: a short reminder, the specific invoice numbers with their amounts and due dates, the total now outstanding, and a clear request for either payment or a reply with a payment date. Always name the actual invoices rather than sending a generic note that the account is overdue.

Never send collections email automatically. Always leave it as a Gmail draft for a human to review, edit, and send, and do not use any send action, only draft creation. In the Slack message, note which accounts had a draft prepared so a person knows to open Gmail and review them. If no accounts cross the thresholds, still post the Slack summary and say that no drafts were needed.

## How to customize

- Change the schedule, for example run it Monday mornings only instead of every weekday at 8am.
- Adjust the thresholds that trigger a drafted email, which start at $10,000 overdue or more than 60 days late.
- Change how many accounts appear in the ranking, or point the summary at a different Slack channel.
- Rewrite the tone of the reminder email, anywhere from a gentle nudge to a final notice.

## Example output

*AR at risk: $487,200* (up $31,400 vs last week)
1 to 30 days: $182,400  |  31 to 60: $121,900  |  61 to 90: $94,600  |  90+: $88,300

*Top accounts by overdue balance*
1. Northwind Logistics: $84,200, oldest INV-10428, 112 days late, 90+ bucket, owner Dana Reyes. Draft ready in Gmail.
2. Cascade Manufacturing: $61,850, oldest INV-10592, 74 days late, 61 to 90 bucket, owner Miguel Santos. Draft ready in Gmail.
3. Harbor Point Retail: $28,400, oldest INV-10731, 41 days late, 31 to 60 bucket, owner Dana Reyes.

3 dunning drafts prepared. Please review and send from Gmail. 2 customers skipped as in dispute or on a payment plan.

## FAQ

### Will this ever send a collections email on its own?

No. Every reminder is created as a draft in Gmail and waits for a person to review, edit, and send it. Sending stays a human decision, which is the whole point of the design.

### What happens to customers who are disputing an invoice or already on a payment plan?

They are skipped. As long as your customer records mark them as in dispute or on a payment plan, they are left out of both the ranked list and the drafted emails so nobody gets chased twice.

### How does it work out the week over week change?

It remembers the total from the previous run and compares against it. The first run establishes the baseline, so the change figure appears from the second run onwards.

### What if we have thousands of overdue invoices?

It reads through the full list in pages, so a large ledger is handled fine. The Slack message still stays short because it ranks the accounts that need attention rather than listing every invoice.

### Do we need to build a report or saved search in NetSuite first?

No. It reads your open invoices directly, so there is nothing to set up in NetSuite beforehand.

Use this prompt in General Input: https://www.generalinput.com/prompts/daily-netsuite-collections-digest-in-slack-with-email-drafts