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.

Agentic Task
NetSuiteSlack BotGmailFinanceOperationsDaily DigestsEmail Automation
PromptCreate

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.

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.

What does this prompt do?

  • 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 do I need to use this?

  • 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

How can I customize it?

  • 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.

FAQs

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.

Related templates

Build a credential rotation checklist when someone leaves

When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.

1Password
Rippling
Slack Bot
+1
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Weekly Amazon S3 bucket security audit posted to Slack

Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.

Amazon S3
Slack Bot
Google Sheets
Agentic Task
Log Agorapulse social conversations to HubSpot contacts

Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.

Agorapulse
HubSpot
Slack Bot
Agentic Task
Clean up HubSpot contacts from your Amazon SES suppression list

Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.

Amazon SES
HubSpot
Slack Bot
Agentic Task
Draft polite follow-ups for emails that never got a reply

Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.

Aurinko
Google Sheets
Slack Bot
Agentic Task

Stop rebuilding your AR aging report by hand.

Let this run every weekday morning so your collections team opens Slack to a ranked list of who to chase and reminder emails already written.