📊 AI token tracker for WhatsApp & Telegram – Save AI usage to Google Sheets
Needs changesWhat this workflow does
This AI workflow has 25 nodes and runs when an HTTP GET request hits its webhook URL (plus 1 other trigger). Along the way it connects Gmail, Airtable, Google Sheets and Google Calendar and 3 more.
How it runs
Trigger: When an HTTP GET request hits its webhook URL (plus 1 other trigger).
- Map (Edit Fields (Set)): sets or maps fields
- Map (Edit Fields (Set)): sets or maps fields
- Audio or Text Separation (If): checks a condition and branches into true / false
- Text Mapping (Edit Fields (Set)): sets or maps fields
- GET Media (HTTP Request): calls an HTTP API
- Filter: keeps only the items that match a condition
- Convert to File: converts data to a file
- AI Agent: runs an AI agent, with model: Chat Model; 3 tools (Send Email, Create Event, Get Contacts)
- Audio Transcription (OpenAI): uses OpenAI
- Clean Up (Code): runs custom JavaScript code
…plus 9 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (17)
- Gmail Tool
n8n-nodes-base.gmailTool - Airtable Tool
n8n-nodes-base.airtableTool - Google Sheets
n8n-nodes-base.googleSheets - Google Calendar Tool
n8n-nodes-base.googleCalendarTool - Code
n8n-nodes-base.code - Telegram
n8n-nodes-base.telegram - AI Agent
@n8n/n8n-nodes-langchain.agent - Webhook
n8n-nodes-base.webhook - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Convert to File
n8n-nodes-base.convertToFile - OpenAI
@n8n/n8n-nodes-langchain.openAi - Telegram Trigger
n8n-nodes-base.telegramTrigger - Filter
n8n-nodes-base.filter - Edit Fields (Set)
n8n-nodes-base.set - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Switch
n8n-nodes-base.switch
From the author
💸 GPT-4o Token Tracker – Measure AI Usage and Cost via WhatsApp or Telegram Hi! I'm Amanda — I create smart, useful AI automations for n8n and Make. This workflow helps you monitor how many tokens are consumed per conversation with AI Agent Tokens, and logs…