# AI token tracker for WhatsApp & Telegram – Save AI usage: n8n workflow

> Started by an incoming Telegram message, and works across Airtable, Gmail, Google Calendar, Google Sheets and one other.

Source: https://millionrounds.com/workflow/ai-token-tracker-for-whatsapp-and-telegram-save-ai-usage (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Scheduling](https://millionrounds.com/workflows?category=Scheduling#library)

# AI token tracker for WhatsApp & Telegram – Save AI usage

Started by an incoming Telegram message, and works across Airtable, Gmail, Google Calendar, Google Sheets and one other. It hands the judgement calls to OpenAI and OpenRouter. 25 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI, OpenRouter

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-token-tracker-for-whatsapp-and-telegram-save-ai-usage)

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

**3** Branches: places the flow splits

**0** Loops or waits

**5** Services it connects to

## The flow

Starts it 2 Model 3 Logic 9 Service 11

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

- 1 **Send Email** Gmail Tool *Service*
- 2 **Get Contacts** Airtable Tool *Service*
- 3 **Create Event** Google Calendar Tool *Service*
- 4 **Evolution API** Webhook *Starts it*
- 5 **Telegram** Telegram trigger *Starts it*
- 6 **Chat Model** Lm Chat Open Router *Model*
- 7 **AI Agent** Agent *Model*
- 8 **Map** Set *Logic*
- 9 **Map1** Set *Logic*
- 10 **Clean Up** Code *Logic*
- 11 **Clean_Up** Code *Logic*
- 12 **Audio or Text Separation** If *Logic*
- 13 **Text Mapping** Set *Logic*
- 14 **Log** Google Sheets *Service*
- 15 **Errors** Google Sheets *Service*
- 16 **GET Media** Http Request *Service*
- 17 **Filter** Filter *Logic*
- 18 **Input Source** Switch *Logic*
- 19 **Input Source1** Switch *Logic*
- 20 **Convert to File** Convert To File *Service*
- 21 **WhatsApp** Http Request *Service*
- 22 **Response** Telegram *Service*
- 23 **WhatsApp Erro** Http Request *Service*
- 24 **Error Response** Telegram *Service*
- 25 **Audio Transcription** Open Ai *Model*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 25, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Airtable, Gmail, Google Calendar, Google Sheets, Telegram
- **Model:** OpenAI, OpenRouter

## Questions

What does it need to run?

An n8n account, plus your own Airtable, Gmail, Google Calendar, Google Sheets and Telegram accounts, and a key for OpenAI and OpenRouter. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls OpenAI and OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 25 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 25 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%2Fai-token-tracker-for-whatsapp-and-telegram-save-ai-usage)
- **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.

[Airtable](https://millionrounds.com/workflows?service=Airtable#library)[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Calendar](https://millionrounds.com/workflows?service=Google+Calendar#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also scheduling, with the same services where possible, closest in size first.

- [**AI-powered meeting research & daily agenda** 25 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/ai-powered-meeting-research-and-daily-agenda)
- [**Automate new customer onboarding with HubSpot** 25 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automate-new-customer-onboarding-with-hubspot)
- [**Automated customer onboarding with HubSpot and Gmail** 25 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automated-customer-onboarding-with-hubspot-and-gmail)
- [**AI chatbot call center: Taxi booking worker** 25 steps · Google Calendar, Postgres](https://millionrounds.com/workflow/ai-chatbot-call-center-taxi-booking-worker)
- [**Automate construction scheduling and procurement in Google Sheets** 25 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-construction-scheduling-and-procurement-in-google-s)
- [**Automate subscription renewal reminders with Google Sheets** 25 steps · Google Sheets, Slack](https://millionrounds.com/workflow/automate-subscription-renewal-reminders-with-google-sheets)
