Weekly Brex card spend and budget review posted to Slack
Every Monday morning, your finance channel gets a plain-English recap of last week's company card spend, with any budget close to its cap flagged at the top.
Every Monday at 8am in our company timezone, run a weekly corporate card spend review using Brex and post it to our finance channel in Slack. Use a cron trigger for this. Brex is not a poll provider on this platform, so the schedule has to come from cron rather than a polling trigger.
Start by pulling spend data from Brex with List primary card transactions. I need two windows so the digest can show a trend: the last seven days of settled transactions, and the seven days before that for comparison. Page through the results using the cursor until there are no more pages, so a busy week does not get silently truncated.
Then pull current budget utilization. Use List budgets and List spend limits to get every budget and spend limit on the account along with its cap and how much has been used so far in the current period. For each one, work out the percentage of the cap consumed.
Important formatting rule: Brex returns monetary amounts as integer minor units plus a currency code, so an amount of 1000 with currency USD means ten dollars. Convert every amount to normal dollars and cents before it appears anywhere in the digest, and never print raw minor units. If more than one currency appears, group the totals by currency instead of adding different currencies together.
Now write a short narrative digest, not a raw transaction dump. It should cover total settled spend for the last seven days and how that compares with the prior seven days, stated as both the dollar change and the percent change, with one sentence of interpretation about what drove the difference. It should list the top five merchants and the top five spending categories by total amount. It should call out every single charge above a configurable large charge threshold that defaults to 1,000 dollars, naming the merchant, the amount, the category, and the cardholder where that information is available. Finally it should list every budget and every spend limit that has crossed 75 percent or 90 percent of its cap, making clear which threshold each one has passed.
Ordering matters a lot here. Lead the message with the budgets and spend limits at risk so the finance lead sees the urgent items in the first few lines, with anything over 90 percent above anything over 75 percent. Put the overall spend comparison next, then the large charges, then the top merchants and categories at the bottom. The finance lead should never have to scroll past a wall of transactions to find out that a budget is nearly exhausted.
Post the finished digest to our finance Slack channel using the Slack Bot Send a Message action. Let me configure which channel it goes to. Format it with Slack mrkdwn rather than standard Markdown, which means single asterisks for bold, and keep it scannable with short sections and bullets. Aim for something a busy person reads in under a minute.
Handle the quiet weeks gracefully. If no budget or spend limit has crossed 75 percent, say so in one clear line rather than omitting the section, because the absence of warnings is itself useful information. If there were no charges above the large charge threshold, say that too. If there were no settled transactions at all in the window, post a brief message saying there was no card spend last week instead of sending an empty report.
Example output
Additional information
What does this prompt do?
- Pulls the last seven days of settled company card spend from Brex every Monday morning and compares the total against the previous seven days, so you can see whether spending is climbing or cooling off.
- Checks every budget and spend limit for how much of the cap has already been used, and calls out the ones that have crossed 75 percent or 90 percent.
- Highlights any single charge above a limit you set, which defaults to 1,000 dollars, plus the five biggest merchants and spending categories for the week.
- Posts the whole thing to your finance Slack channel as a short written summary that leads with the budgets at risk, not a wall of transactions.
What do I need to use this?
- A Brex account with corporate cards, and permission to view transactions, budgets, and spend limits
- A Slack workspace and a channel where the finance team wants the weekly recap to land
- Budgets or spend limits already set up in Brex, since the at-risk section is built from the caps you have defined there
How can I customize it?
- Change the timing. Monday at 8am is just a starting point, and any day or hour works if your finance review happens midweek.
- Move the large charge threshold up or down from the 1,000 dollar default, and adjust the 75 and 90 percent warning levels to match how tightly you run budgets.
- Send it somewhere else, such as a private finance channel, a direct message to the finance lead, or a wider leadership channel.
FAQs
Will this work if we have not set up any budgets in Brex?
Does this move money or change anything in Brex?
What counts as last week's spend?
Can we get this more often than weekly?
Who will the Slack message appear to come from?
Related templates
Every weekday, find every unpaid JobNimbus invoice, email each customer one reminder that gets firmer as it ages, and post a receivables summary to Slack.
Every weekday at 7am, your active courses are checked for missing work, silent logins, and slipping grades, with a ranked list sent to your advising channel.
Every hour, find the tickets closest to breaching, leave a nudge on each one, and post a ranked at-risk list to your support channel.
Every weekday afternoon, each student who is behind gets a warm, personal message in their Canvas inbox listing exactly what they owe.
Every Monday at 8am, see exactly which assignments have work waiting, sorted worst first, posted to Slack and logged to a spreadsheet.
Every weekday morning we compare your password vault against your HR records and suspend access for anyone who has already left.
Stop rebuilding the card spend recap by hand every Monday.
Let the weekly review pull itself together in Brex and land in Slack before your finance lead has finished their first coffee.