⏰ Chapter 5
Automating a report with routines
Routines are a Claude Code feature (not part of the Spendesk MCP) that let you replay a question automatically on a fixed schedule — daily, weekly, monthly.
What exactly is a routine?
Important to understand before going further: the Spendesk MCP doesn't schedule anything itself. The MCP only supplies data when asked — it's a "pull" architecture (Claude pulls the information), not "push" (nothing pushes information to Claude on its own).
What makes automation possible is a Claude Code feature called a routine: a scheduled task that automatically re-runs a request at a fixed interval (every day at 8am, every Monday, the 1st of each month...). The MCP still supplies the data at that exact moment — the routine simply triggers the question on your behalf.
The real case that illustrates the need
A CFO client (we'll call him Bragi) used to do the same check manually every morning: ask Claude for the state of pending supplier invoices before starting his day — "a bit like a ritual before morning coffee." That manual repetition is exactly what a routine replaces: the same question, asked automatically, without him having to think about it.
Turning an existing skill into a routine
Once a question works well in a manual conversation (see the previous chapter), you can ask Claude to turn it into a scheduled task.
Every weekday at 8am, run the overdue-invoice tracking skill (spendesk_get_due_invoices) and summarize invoices due within the next 3 days, sorted by amount descending.
Claude will then set up a recurring run on that schedule, so you don't have to restart the conversation every morning.
Routine examples by frequency
Daily (AP Manager): today's payment priority list, based on
spendesk_get_due_invoices— so a delay is never discovered at the last minute.
Weekly (CFO): a 4-week cash flow forecast, based on
spendesk_analyze_spendand scheduled payments — to anticipate funding needs.
Monthly (Controller): a close checklist (GL reconciliation, duplicate detection, un-exported invoices) — to de-risk the close before it becomes urgent.
Monthly (Procurement): aging of unprocessed purchase requests — to avoid a backlog of orphaned purchase orders.
The limitation to know about
A scheduled routine runs the request and produces a result — but by default, that result stays inside your Claude conversation. If you want that result pushed somewhere else automatically (a Slack channel, for instance), you need to combine the routine with a delivery channel — which is exactly the topic of the next chapter.
To turn this result into an alert your whole team can see: Building Slack alerts with Claude.
Related skills
Generate a prioritized payment queue with three urgency levels: overdue, due within 7 days, and upcoming in 30 days.
Track where invoices stand in the payment cycle — approved pending export, scheduled, exported, settled — with delta mode for daily cash flow automation.