# Monitor AI budgets and optimize costs with Claude and Slack: n8n workflow

> Started by a clock, and works across Email, Slack and n8n data table. It hands the judgement calls to Claude.

Source: https://millionrounds.com/workflow/monitor-ai-budgets-and-optimize-costs-with-claude-and-slack (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Monitor AI budgets and optimize costs with Claude and Slack

Started by a clock, and works across Email, Slack and n8n data table. It hands the judgement calls to Claude. 23 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Claude

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmonitor-ai-budgets-and-optimize-costs-with-claude-and-slack)

**23 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 13 Logic 5 Service 4

The steps in the order they run, from what starts it.

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **Anthropic Model - Cost Intelligence** Lm Chat Anthropic *Model*
- 3 **Cost Analysis Output Parser** Output Parser Structured *Model*
- 4 **Anthropic Model - Budget Alert** Lm Chat Anthropic *Model*
- 5 **Budget Alert Output Parser** Output Parser Structured *Model*
- 6 **Anthropic Model - Routing** Lm Chat Anthropic *Model*
- 7 **Routing Output Parser** Output Parser Structured *Model*
- 8 **Cost Projection Calculator Tool** Tool Code *Model*
- 9 **Anthropic Model - Coordinator** Lm Chat Anthropic *Model*
- 10 **Coordinator Output Parser** Output Parser Structured *Model*
- 11 **Workflow Configuration** Set *Logic*
- 12 **Cost Intelligence Agent** Agent *Model*
- 13 **Budget Alert Agent Tool** Agent Tool *Model*
- 14 **Routing Recommendation Agent Tool** Agent Tool *Model*
- 15 **Optimization Coordinator Agent** Agent *Model*
- 16 **Generate Mock Metrics Data** Code *Logic*
- 17 **Route by Budget Status** Switch *Logic*
- 18 **Store Cost Analysis** Data Table *Service*
- 19 **Route by Action Type** Switch *Logic*
- 20 **Send Slack Alert** Slack *Service*
- 21 **Send Executive Report Email** Email Send *Service*
- 22 **Merge Notification Results** Merge *Logic*
- 23 **Store Optimization Actions** Data Table *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 23, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Email, Slack, n8n data table
- **Model:** Claude

## Questions

What does it need to run?

An n8n account, plus your own Email and Slack accounts, and a key for Claude. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls Claude. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 23 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmonitor-ai-budgets-and-optimize-costs-with-claude-and-slack)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Email](https://millionrounds.com/workflows?service=Email#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Categorize emails & get Telegram alerts with Azure OpenAI** 23 steps · calls a model · Email, Google Sheets](https://millionrounds.com/workflow/categorize-emails-and-get-telegram-alerts-with-azure-openai)
- [**Detect and correct claims cost leakage with OpenAI** 23 steps · calls a model · Email, Postgres](https://millionrounds.com/workflow/detect-and-correct-claims-cost-leakage-with-openai)
- [**Monitor attack surface changes with OpenAI and Postgres** 23 steps · calls a model · Email, Postgres](https://millionrounds.com/workflow/monitor-attack-surface-changes-with-openai-and-postgres)
- [**Analyze contract risk from PDFs with OpenAI and Supabase** 23 steps · Gmail, Slack](https://millionrounds.com/workflow/analyze-contract-risk-from-pdfs-with-openai-and-supabase)
- [**Back up your n8n workflows to GitHub with Slack** 23 steps · GitHub, Slack](https://millionrounds.com/workflow/back-up-your-n8n-workflows-to-github-with-slack)
- [**Build an event-driven pub/sub bus with HTTP and Slack** 23 steps · Slack](https://millionrounds.com/workflow/build-an-event-driven-pub-sub-bus-with-http-and-slack)
