# Personal email management with Gemini and Gmail: n8n workflow

> Started by an arriving email, and works across Gmail, Mattermost, NocoDB and Telegram. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/personal-email-management-with-gemini-and-gmail (Millionrounds; every figure on the page links to its filing or article)

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

# Personal email management with Gemini and Gmail

Started by an arriving email, and works across Gmail, Mattermost, NocoDB and Telegram. It hands the judgement calls to Gemini. 37 steps, 3 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpersonal-email-management-with-gemini-and-gmail)

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

**3** Branches: places the flow splits

**1** Loop or waits

**4** Services it connects to

## The flow

Starts it 1 Model 9 Logic 11 Service 16

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

- 1 **Gmail Trigger** Gmail trigger *Starts it*
- 2 **Structured Output Parser** Output Parser Structured *Model*
- 3 **Structured Output Parser1** Output Parser Structured *Model*
- 4 **Mattermost** Mattermost *Service*
- 5 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 6 **Messages** Set *Logic*
- 7 **Auto-fixing Output Parser** Output Parser Autofixing *Model*
- 8 **Auto-fixing Output Parser1** Output Parser Autofixing *Model*
- 9 **Text Classifier** Text Classifier *Model*
- 10 **Basic LLM Chain1** Chain Llm *Model*
- 11 **Summarization Chain** Chain Summarization *Model*
- 12 **Basic LLM Chain** Chain Llm *Model*
- 13 **Code** Code *Logic*
- 14 **IMP** Gmail *Service*
- 15 **Work** Gmail *Service*
- 16 **Finance** Gmail *Service*
- 17 **Social** Gmail *Service*
- 18 **Updates** Gmail *Service*
- 19 **StockMarket** Gmail *Service*
- 20 **Trash** Gmail *Service*
- 21 **Others** Gmail *Service*
- 22 **If** If *Logic*
- 23 **If1** If *Logic*
- 24 **NocoDB** Noco Db *Service*
- 25 **Constants** Global Constants *Service*
- 26 **No Operation, do nothing** No Op *Logic*
- 27 **IMP Category** Set *Logic*
- 28 **Work Category** Set *Logic*
- 29 **Finance Category** Set *Logic*
- 30 **MarkRead** Gmail *Service*
- 31 **Telegram1** Telegram *Service*
- 32 **Promotion** Gmail *Service*
- 33 **Telegram** Telegram *Service*
- 34 **Loop Over Items** Split In Batches *Logic*
- 35 **Category** If *Logic*
- 36 **Coupons** Gmail *Service*
- 37 **Format** Code *Logic*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 37, with 3 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Mattermost, NocoDB, Telegram
- **Model:** Gemini

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Mattermost, NocoDB and Telegram accounts, and a key for Gemini. 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. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 37 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 37 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%2Fpersonal-email-management-with-gemini-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)[Mattermost](https://millionrounds.com/workflows?service=Mattermost#library)[NocoDB](https://millionrounds.com/workflows?service=NocoDB#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

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

- [**AI Email Agent with Gmail and Telegram Approval** 38 steps · calls a model · Gmail, Redis](https://millionrounds.com/workflow/ai-email-agent-with-gmail-and-telegram-approval)
- [**AI powered RAG chatbot for your docs + Google Drive + Gemini** 35 steps · calls a model · Google Docs, Google Drive](https://millionrounds.com/workflow/ai-powered-rag-chatbot-for-your-docs-google-drive-gemini)
- [**Automate YouTube Shorts creation from Telegram prompts** 39 steps · calls a model · Google Drive, Telegram](https://millionrounds.com/workflow/automate-youtube-shorts-creation-from-telegram-prompts)
- [**Assist hospital doctors with Telegram and OpenAI** 34 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/assist-hospital-doctors-with-telegram-and-openai)
- [**Classify and auto-reply to Gmail with OpenAI** 34 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/classify-and-auto-reply-to-gmail-with-openai)
- [**Email management system with OpenAI and Pinecone DB** 34 steps · calls a model · Gmail, Pinecone](https://millionrounds.com/workflow/email-management-system-with-openai-and-pinecone-db)
