# Organize Gmail with OpenAI and Telegram: n8n workflow template

> Started by an arriving email, and works across Gmail, Telegram and WhatsApp. It puts Gemini, OpenAI and one other behind a retrieval step, so answers are...

Source: https://millionrounds.com/workflow/organize-gmail-with-openai-and-telegram (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Organize Gmail with OpenAI and Telegram

Started by an arriving email, and works across Gmail, Telegram and WhatsApp. It puts Gemini, OpenAI and one other behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 23 steps, 1 branch, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini, OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Forganize-gmail-with-openai-and-telegram)

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

**1** Branch: places the flow splits

**2** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 9 Logic 5 Service 8

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

- 1 **Gmail Trigger1** Gmail trigger *Starts it*
- 2 **Check Sent2** Gmail Tool *Service*
- 3 **Check Sent3** Gmail Tool *Service*
- 4 **OpenRouter Chat Model2** Lm Chat Open Router *Model*
- 5 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 6 **Google Gemini Chat Model2** Lm Chat Google Gemini *Model*
- 7 **Google Gemini Chat Model3** Lm Chat Google Gemini *Model*
- 8 **Simple Memory1** Memory Buffer Window *Model*
- 9 **OpenRouter Chat Model3** Lm Chat Open Router *Model*
- 10 **Get a message1** Gmail *Service*
- 11 **AI Agent3** Agent *Model*
- 12 **Structured Output Parser1** Output Parser Structured *Model*
- 13 **AI Agent1** Agent *Model*
- 14 **Loop Over Items1** Split In Batches *Logic*
- 15 **Code1** Code *Logic*
- 16 **Create Label if Doesn't exist1** Gmail *Service*
- 17 **If1** If *Logic*
- 18 **Wait1** Wait *Logic*
- 19 **Get Existing Labels1** Gmail *Service*
- 20 **Send a text message1** Telegram *Service*
- 21 **Send message1** Whats App *Service*
- 22 **Filter1** Filter *Logic*
- 23 **Add label to thread1** Gmail *Service*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 23, with 1 branch, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Telegram, WhatsApp
- **Model:** Gemini, OpenAI, OpenRouter
- **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 Gmail, Telegram and WhatsApp accounts, and a key for Gemini and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an arriving email.

Does it use AI?

Yes. It calls Gemini, OpenAI and OpenRouter. 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 23 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 23 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%2Forganize-gmail-with-openai-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.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)[WhatsApp](https://millionrounds.com/workflows?service=WhatsApp#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Automate Reddit replies with F5Bot and OpenAI** 23 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-reddit-replies-with-f5bot-and-openai)
- [**Categorize emails & get Telegram alerts with Azure OpenAI** 23 steps · calls a model · Email, Google Sheets](https://millionrounds.com/workflow/categorize-emails-and-get-telegram-alerts-with-azure-openai)
- [**Daily AI research summary from arXiv with Gemini and Notion** 23 steps · calls a model · Notion, Telegram](https://millionrounds.com/workflow/daily-ai-research-summary-from-arxiv-with-gemini-and-notion)
- [**Monitor Lis Pendens real estate filings with Telegram** 23 steps · calls a model · Telegram](https://millionrounds.com/workflow/monitor-lis-pendens-real-estate-filings-with-telegram)
- [**Analyze contract risk from PDFs with OpenAI and Supabase** 23 steps · Gmail, Slack](https://millionrounds.com/workflow/analyze-contract-risk-from-pdfs-with-openai-and-supabase)
- [**Monitor customer risk and AI feedback with PostgreSQL** 23 steps · Discord, Gmail](https://millionrounds.com/workflow/monitor-customer-risk-and-ai-feedback-with-postgresql)
