# Weekly ServiceTitan accounts receivable aging snapshot

> Every Monday morning, every unpaid invoice gets sorted into aging buckets, logged to a spreadsheet, and summarized in Slack so nothing ages past 90 days.

- Workflow type: code
- Services: ServiceTitan, Google Sheets, Slack Bot
- Categories: Finance, Operations
- Published: 2026-08-09

## What it does

- Pulls every ServiceTitan invoice that still has money owing on it and attaches the right customer name to each one.
- Sorts every balance into standard aging buckets: 0 to 30 days, 31 to 60 days, 61 to 90 days, and over 90 days.
- Adds one row per outstanding invoice to a Google Sheet and stamps it with the run date, so the sheet builds a week over week trend instead of overwriting itself.
- Posts a Slack summary showing the total owed in each bucket plus the five largest overdue balances.

## What you'll need

- A ServiceTitan account with access to your invoices and customers.
- A Google account and a spreadsheet where the weekly rows should collect.
- A Slack workspace and the channel where the summary should land.

## Prompt

Every Monday at 7am, build my accounts receivable aging snapshot from ServiceTitan so nothing slips past 90 days without me seeing it. Use a cron trigger for the weekly schedule. Keep this strictly deterministic with no judgement calls: it is date math and formatting over structured invoice data.

Start with the ServiceTitan "List Invoices" operation to pull every invoice that still has a remaining balance greater than zero, paging through all results until there are no more. Then use the ServiceTitan "List Customers" operation to resolve the customer for each of those invoices, and attach the customer name to every outstanding invoice record.

For each outstanding invoice, work out its age in days as the difference between the run date and the invoice date, then sort the balance into one of four standard aging buckets: 0 to 30 days, 31 to 60 days, 61 to 90 days, and over 90 days. Base the bucketing on the invoice date.

Append one row per outstanding invoice to my Google Sheet using the "Append Values" operation. Each row should carry the run date, invoice number, invoice date, customer name, remaining balance, age in days, and the aging bucket it landed in. Always append and never overwrite, and stamp every row in the run with the same run date, so the sheet accumulates a week over week trend I can group and chart later rather than replacing last week's numbers.

Finally, post a summary to my accounts receivable channel with the Slack "Send a Message" operation, using the Slack Bot integration so it posts as a bot rather than as me. The message should show the total amount owed in each of the four buckets, the overall total outstanding, and then the five largest overdue balances sorted from largest to smallest, each listing the customer name, invoice number, amount owed, and days outstanding. Format currency amounts consistently and use Slack mrkdwn formatting.

## How to customize

- The day and time it runs. Monday at 7am is the default, but any weekly slot works just as well.
- The aging bucket boundaries, if your team tracks something other than 30, 60, and 90 days.
- Which Slack channel gets the summary, and how many of the largest overdue balances it lists.

## FAQ

### Will this overwrite my spreadsheet every week?

No. Each run adds new rows underneath what is already there and stamps them with the date it ran. That way you keep every past snapshot and can see whether your overdue balances are growing or shrinking week over week.

### Does it include invoices that are already paid?

No. Only invoices with money still owing are included, so the sheet and the Slack summary stay focused on what you actually need to collect.

### What decides which aging bucket an invoice lands in?

The invoice date. The workflow measures how many days have passed between the invoice date and the day it runs, then drops the balance into the 0 to 30, 31 to 60, 61 to 90, or over 90 day bucket.

### Can I run it more often than weekly?

Yes. Weekly on Monday matches the rhythm most collections teams use, but you can set it to run daily or twice a month. The spreadsheet keeps accumulating either way.

### Do I need to set up the spreadsheet first?

Just create an empty sheet and point the workflow at it. Adding a header row is optional, and new rows are added below whatever is already in the sheet.

Use this prompt in General Input: https://www.generalinput.com/prompts/weekly-servicetitan-accounts-receivable-aging-snapshot