Track AI Agent Costs & Decisions with Webhooks + WhatsApp Alerts
Track AI Agent Costs & Decisions with Webhooks + WhatsApp Alerts
Regular price
£66.99
Regular price
£66.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Track AI Agent Costs & Decisions with Webhooks + WhatsApp Alerts
Regular price
£66.99
Regular price
£66.99
Sale price
Unit price
/
per
Track AI Agent Costs & Decisions in Real Time—With Webhooks + WhatsApp Alerts
This n8n workflow receives webhook events from your AI agents, calculates estimated spend from token usage and pricing, stores a persistent execution ledger, and alerts you on WhatsApp when a run exceeds your budget—plus a daily digest of activity and costs.
What this workflow does
- Logs agent events via Webhook (POST): Send one event or a batch of LLM/tool/decision/error events to the workflow.
- Validates events and estimates cost: For each event, it computes cost from input/output token counts and configured model pricing, or uses an explicit USD cost (with optional tool cost).
- Appends to a persistent execution ledger: The priced events are stored in n8n workflow static data, including per-run summaries and retention limits (max entries/runs).
- Returns a JSON webhook response: The caller receives how many events were recorded and the updated run totals.
- WhatsApp budget alerts per run: If a run exceeds the configured per-run budget and an alert hasn’t been sent yet for that run, it sends a WhatsApp message.
- Generates ledger reports (GET): A GET webhook returns a JSON ledger report filtered by run ID, agent, time window, and limit.
- Daily 24-hour digest: A scheduled run builds a 24-hour cost/activity summary and sends it via WhatsApp.
Use cases
- Monitor costs for multi-step AI agents and tool calls across environments.
- Get instant WhatsApp notifications when a run’s spend crosses a per-run budget.
- Produce on-demand JSON reports for audits, debugging decisions, or performance review.
- Send a daily “what happened and how much it cost” summary to your team.
Technical details
-
Nodes/blocks:
if,set,code,webhook,whats app, andsticky note. - Integrations: WhatsApp Business credentials (WhatsApp phone number ID + recipient phone number).
- Core feature: Persistent ledger stored in n8n workflow static data with retention enforcement.
Perfect for: n8n users, automation engineers, and SaaS operators who need visibility into AI agent spend, decisions, and errors.
