# AI secretary for scheduling with WhatsApp and Telegram: n8n workflow

> Started by an incoming Telegram message, and works across Google Calendar, Redis and Telegram.

Source: https://millionrounds.com/workflow/ai-secretary-for-scheduling-with-whatsapp-and-telegram (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 secretary for scheduling with WhatsApp and Telegram

Started by an incoming Telegram message, and works across Google Calendar, Redis and Telegram. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 31 steps, 4 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-secretary-for-scheduling-with-whatsapp-and-telegram)

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

**4** Branches: places the flow splits

**3** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 3 Logic 18 Service 8

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

- 1 **Simple Memory** Memory Buffer Window *Model*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Check Schedule** Google Calendar Tool *Service*
- 4 **Create Appointment** Google Calendar Tool *Service*
- 5 **Cancel Appointment** Google Calendar Tool *Service*
- 6 **Telegram Trigger** Telegram trigger *Starts it*
- 7 **on new message (Evolution)** Webhook *Starts it*
- 8 **Calendar AI Agent** Agent *Model*
- 9 **TELEGRAM - CHANNEL** Set *Logic*
- 10 **WHATSAPP - CHANNEL** Set *Logic*
- 11 **SPLIT USER MESSAGE (INPUT)** Set *Logic*
- 12 **CHANNEL** Set *Logic*
- 13 **MESSAGES INTO JSON ARRAY** Split Out *Logic*
- 14 **VARIABLES - CONFIG** Set *Logic*
- 15 **CHECK CHANNEL** Switch *Logic*
- 16 **DATE NOW** Date Time *Logic*
- 17 **LOOP MESSAGE - WHATSAPP** Split In Batches *Logic*
- 18 **LOOP MESSAGE - TELEGRAM** Split In Batches *Logic*
- 19 **CHECK CHANNEL1** Switch *Logic*
- 20 **SEND MESSAGE WHATSAPP** Evolution Api *Service*
- 21 **IF EXIST MESSAGE** If *Logic*
- 22 **OBJECT MSG - WHASTAPP** Code *Logic*
- 23 **OBJECT MSG - TELEGRAM** Code *Logic*
- 24 **SEND MESSAGE TELEGRAM** Telegram *Service*
- 25 **OBJECT MSG** Set *Logic*
- 26 **REDIS - DEBOUNCE - SET** Redis *Service*
- 27 **REDIS - DEBOUNCE - GET** Redis *Service*
- 28 **HAS TIME PASSED?** Switch *Logic*
- 29 **REDIS - DEBOUNCE - DELETE** Redis *Service*
- 30 **WAIT TIME - 5 SECONDS DEBOUNCE** Wait *Logic*
- 31 **OBJECT MSG - CONCATENATE** Code *Logic*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 31, with 4 branches, 3 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Calendar, Redis, Telegram
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Calendar, Redis and Telegram accounts, and a key for OpenAI. 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. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 31 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 31 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-secretary-for-scheduling-with-whatsapp-and-telegram)
- **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.

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

## Workflows like it

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

- [**Calendar Management & RAG Agent with OpenAI and OpenRouter** 31 steps · calls a model · Google Calendar, n8n data table](https://millionrounds.com/workflow/calendar-management-and-rag-agent-with-openai-and-openrouter)
- [**Ultimate AI assistant: Automate email, calendar, webSearch** 31 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/ultimate-ai-assistant-automate-email-calendar-websearch)
- [**Validate property compliance risk and orchestrate actions** 31 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/validate-property-compliance-risk-and-orchestrate-actions)
- [**Route missed roofing calls to a Retell AI agent with Twilio** 31 steps · Google Calendar, Google Sheets](https://millionrounds.com/workflow/route-missed-roofing-calls-to-a-retell-ai-agent-with-twilio)
- [**Automate email & calendar management with Gmail** 32 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automate-email-and-calendar-management-with-gmail)
- [**Automate pet grooming posts & bookings with Facebook** 32 steps · calls a model · Google Calendar, Google Sheets](https://millionrounds.com/workflow/automate-pet-grooming-posts-and-bookings-with-facebook)
