# Manage tasks, email & calendar with OpenAI and Gmail: n8n workflow

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

Source: https://millionrounds.com/workflow/manage-tasks-email-and-calendar-with-openai-and-gmail (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)

# Manage tasks, email & calendar with OpenAI and Gmail

Started by an incoming Telegram message, and works across Gmail, Google Calendar, Google Sheets and Telegram. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 27 steps, 1 branch: 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%2Fmanage-tasks-email-and-calendar-with-openai-and-gmail)

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

**1** Branch: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 2 Model 4 Logic 7 Service 14

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

- 1 **Read Unread Emails** Gmail Tool *Service*
- 2 **Send Email** Gmail Tool *Service*
- 3 **Create Calendar Event** Google Calendar Tool *Service*
- 4 **Read Calendar Events** Google Calendar Tool *Service*
- 5 **Delete Calendar Event** Google Calendar Tool *Service*
- 6 **Read Task Sheet** Google Sheets Tool *Service*
- 7 **Add New Task** Google Sheets Tool *Service*
- 8 **Update Task Status** Google Sheets Tool *Service*
- 9 **Conversation Memory** Memory Buffer Window *Model*
- 10 **30-Minute Reminder Timer** Schedule trigger *Starts it*
- 11 **OpenAI Language Model** Lm Chat Open Ai *Model*
- 12 **Telegram Bot Trigger** Telegram trigger *Starts it*
- 13 **AI Personal Assistant** Agent *Model*
- 14 **Read Task Data** Google Sheets *Service*
- 15 **Store User Chat ID** Code *Logic*
- 16 **Prevent Duplicate Responses** Code *Logic*
- 17 **Filter Due Tasks** Code *Logic*
- 18 **Route Text or Voice Messages** Switch *Logic*
- 19 **Send Response to User** Telegram *Service*
- 20 **Format Reminder Message** Code *Logic*
- 21 **Extract Text Message** Set *Logic*
- 22 **Get Voice File from Telegram** Telegram *Service*
- 23 **Send Task Reminder** Telegram *Service*
- 24 **Merge Text and Voice Input** Set *Logic*
- 25 **Download Voice File** Http Request *Service*
- 26 **Mark Reminder Sent** Google Sheets *Service*
- 27 **Transcribe Voice to Text** Open Ai *Model*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 27, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Calendar, Google Sheets, 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 Gmail, Google Calendar, Google Sheets 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 27 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 27 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%2Fmanage-tasks-email-and-calendar-with-openai-and-gmail)
- **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)[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.

- [**Log Telegram client updates to Notion and Google Sheets** 27 steps · calls a model · Google Calendar, Google Drive](https://millionrounds.com/workflow/log-telegram-client-updates-to-notion-and-google-sheets)
- [**Manage Google Calendar and Gmail from Telegram with Claude** 27 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/manage-google-calendar-and-gmail-from-telegram-with-claude)
- [**Morning briefing podcast: generate daily summaries with Gemini** 27 steps · calls a model · Google Calendar, Telegram](https://millionrounds.com/workflow/morning-briefing-podcast-generate-daily-summaries-with-gemin)
- [**Transcribe and analyze sales meetings with Deepgram and Gemini** 27 steps · calls a model · Gmail, GoHighLevel](https://millionrounds.com/workflow/transcribe-and-analyze-sales-meetings-with-deepgram-and-gemi)
- [**Book, manage, and check appointments with Vapi** 27 steps · Google Calendar](https://millionrounds.com/workflow/book-manage-and-check-appointments-with-vapi)
- [**Complete booking system with Google Calendar** 27 steps · Google Calendar](https://millionrounds.com/workflow/complete-booking-system-with-google-calendar)
