GenAiHub

Last checked 23 October 2026 — responded normally.

Track AI agent costs and decisions via webhooks and WhatsApp digests

Quick overview

Live
Open / InstallLast updated October 23, 2026

Description

Quick overview This workflow exposes webhooks to record AI agent events (LLM calls, tool calls, decisions, and errors), calculates estimated cost from token usage, stores a persistent execution ledger in n8n static data, and sends WhatsApp alerts and daily digests with spend and activity summaries. How it works Receives a POST webhook request with one event or a batch of agent events to log. Validates each event and calculates cost from input/output token counts and model pricing (or an explicit USD cost plus optional tool cost). Appends the priced events to a persistent ledger in n8n workflow static data, updates per-run summaries, and enforces retention limits for total entries and runs. Responds to the webhook caller with a JSON summary including how many events were recorded and the updated run totals. Sends a WhatsApp message if a run exceeds the configured per-run budget and no alert has been sent for that run yet. Receives a GET webhook request to generate a JSON ledger report filtered by run ID, agent, time window, and limit. Runs daily on a schedule to build a 24-hour cost/activity digest and sends it via WhatsApp. Setup Add WhatsApp Business credentials for the WhatsApp nodes and set your WhatsApp phone number ID and recipient phone number. Configure the ledger settings (per-run budget, token pricing per 1M tokens, and retention limits) in the workflow’s configuration values. Activate the workflow so the ledger persists in workflow static data, then copy the webhook URLs and configure your agents/supervisor to POST events to the event endpoint and query reports from the report endpoint. An n8n automation workflow template by Oneclick AI Squad.

Community Metrics

Views
0
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Oneclick AI Squad

Platform

web

Pricing model

free

Categories

  • Automation

Tags

  • n8n
  • workflow
  • whatsapp-business-cloud
  • code

Capabilities

  • 2 nodes

Information

TypeWorkflow
Sourcen8n
AddedOctober 18, 2026

Comments

?

Others in the same category, ranked by how often they are opened.