Automation library · Scheduling

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.

LargeCalls a model: OpenAI, OpenRouter

25 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
5Services it connects to

The flow

Starts it 2Model 3Logic 9Service 11

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

  1. 1Send EmailGmail ToolService
  2. 2Get ContactsAirtable ToolService
  3. 3Create EventGoogle Calendar ToolService
  4. 4Evolution APIWebhookStarts it
  5. 5TelegramTelegram triggerStarts it
  6. 6Chat ModelLm Chat Open RouterModel
  7. 7AI AgentAgentModel
  8. 8MapSetLogic
  9. 9Map1SetLogic
  10. 10Clean UpCodeLogic
  11. 11Clean_UpCodeLogic
  12. 12Audio or Text SeparationIfLogic
  13. 13Text MappingSetLogic
  14. 14LogGoogle SheetsService
  15. 15ErrorsGoogle SheetsService
  16. 16GET MediaHttp RequestService
  17. 17FilterFilterLogic
  18. 18Input SourceSwitchLogic
  19. 19Input Source1SwitchLogic
  20. 20Convert to FileConvert To FileService
  21. 21WhatsAppHttp RequestService
  22. 22ResponseTelegramService
  23. 23WhatsApp ErroHttp RequestService
  24. 24Error ResponseTelegramService
  25. 25Audio TranscriptionOpen AiModel

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.