# Track AI token usage from WhatsApp and Telegram with responses and Google Sheets logging
This automation workflow is designed for business owners and teams using AI to handle incoming messages from messaging apps. It provides a complete cycle of processing text and voice messages from WhatsApp and Telegram, while tracking AI usage costs through token consumption logging.
## Who it´s for
- Business owners on WhatsApp using AI for customer communication
- Support teams on Telegram handling voice messages automatically
- Analysts tracking AI usage costs via token metrics
- Teams integrating multi-messenger support with AI cost visibility
## What the automation does
- Receives messages from WhatsApp (via Evolution API) and Telegram as triggers
- Processes text and audio messages using a LangChain-based agent
- Transcribes audio using OpenAI
- Generates responses via OpenRouter
- Logs token usage and errors into Google Sheets
- Sends replies back to the user in the original messenger
## What´s included
- Ready-to-use n8n workflow
- Message processing and state management logic
- Integrations with WhatsApp (Evolution API), Telegram, OpenAI, OpenRouter, and Google Sheets
- Basic textual guide for launch and adaptation
## Requirements for setup
- n8n account (cloud or self-hosted)
- Access to Evolution API for WhatsApp
- Telegram bot with webhook access
- API keys from OpenAI and OpenRouter
- Google Sheets access with write permissions
## Benefits and outcomes
- Full control over AI usage costs via token tracking
- Automated handling of requests from two major messengers
- Centralized storage of token and error logs
- Reduced manual intervention in customer support
- Ability to analyze AI agent performance using sheet data
- Error alerts via structured logging in Google Sheets
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet