# Sort and manage your Gmail inbox with Vertex AI: n8n workflow

> Started by a clock, and works across Gmail and Google Tasks. It hands the judgement calls to a language model.

Source: https://millionrounds.com/workflow/sort-and-manage-your-gmail-inbox-with-vertex-ai (Millionrounds; every figure on the page links to its filing or article)

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

# Sort and manage your Gmail inbox with Vertex AI

Started by a clock, and works across Gmail and Google Tasks. It hands the judgement calls to a language model. 30 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsort-and-manage-your-gmail-inbox-with-vertex-ai)

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

**2** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 10 Logic 7 Service 12

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

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **Google Vertex Chat Model** Lm Chat Google Vertex *Model*
- 3 **Google Vertex Chat Model1** Lm Chat Google Vertex *Model*
- 4 **Create a task in Google Tasks** Google Tasks Tool *Service*
- 5 **Google Vertex Chat Model3** Lm Chat Google Vertex *Model*
- 6 **Google Vertex Chat Model4** Lm Chat Google Vertex *Model*
- 7 **Google Vertex Chat Model5** Lm Chat Google Vertex *Model*
- 8 **Fetch daily emails.** Gmail *Service*
- 9 **Analyze importance and reply needs via AI** Information Extractor *Model*
- 10 **Generate daily summary message** Chain Llm *Model*
- 11 **Google Task writer** Agent *Model*
- 12 **Structured Output Parser** Output Parser Structured *Model*
- 13 **Generate AI draft** Chain Llm *Model*
- 14 **Time Saving Node** Time Saved *Service*
- 15 **Merge ID with email data** Merge *Logic*
- 16 **Merge ID with email data.** Merge *Logic*
- 17 **removing all previous n8n tags** Gmail *Service*
- 18 **Apply n8n Sorted label** Gmail *Service*
- 19 **Rank items by importance** Switch *Logic*
- 20 **Filter: Reply required.** If *Logic*
- 21 **Send Email to yourself** Gmail *Service*
- 22 **Import AI draft in Gmail** Gmail *Service*
- 23 **Combine email data: Subject, Snippet & Sender** Aggregate *Logic*
- 24 **Combine email data: Subject, Snippet & Sender.** Aggregate *Logic*
- 25 **Add important Label** Gmail *Service*
- 26 **Combine Priority 1 & 2.** Merge *Logic*
- 27 **Mark email as read** Gmail *Service*
- 28 **Mark Email as read** Gmail *Service*
- 29 **not important Label** Gmail *Service*
- 30 **delete from Inbox** Gmail *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 30, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Tasks
- **Model:** A language model, family not declared

## Questions

What does it need to run?

An n8n account, plus your own Gmail and Google Tasks accounts, and a key for a language model. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls a language model. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 30 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 30 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%2Fsort-and-manage-your-gmail-inbox-with-vertex-ai)
- **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 Tasks](https://millionrounds.com/workflows?service=Google+Tasks#library)

## Workflows like it

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

- [**Flow from Reddit to Gmail with OpenAI** 30 steps · calls a model · Gmail, Reddit](https://millionrounds.com/workflow/flow-from-reddit-to-gmail-with-openai)
- [**Automate agile project setup with OpenAI and Jira** 32 steps · calls a model · Gmail, Jira](https://millionrounds.com/workflow/automate-agile-project-setup-with-openai-and-jira)
- [**Triage and label Gmail emails with OpenAI** 28 steps · calls a model · Gmail](https://millionrounds.com/workflow/triage-and-label-gmail-emails-with-openai)
- [**AI voice & text note-taking with LINE Messaging** 27 steps · calls a model · Gmail, Supabase vectors](https://millionrounds.com/workflow/ai-voice-and-text-note-taking-with-line-messaging)
- [**Email-to-task automation with Outlook and Microsoft To Do** 26 steps · calls a model · Gmail, Google Tasks](https://millionrounds.com/workflow/email-to-task-automation-with-outlook-and-microsoft-to-do)
- [**AI inbox assistant with OpenAI and Gmail** 25 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/ai-inbox-assistant-with-openai-and-gmail)
