# Personal AI agent with Gemini and Gmail: n8n workflow template

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

Source: https://millionrounds.com/workflow/personal-ai-agent-with-gemini-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)

# Personal AI agent with Gemini and Gmail

Started by an incoming Telegram message, and works across Gmail, Google Calendar, Google Sheets and Telegram. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 28 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini Retrieval

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

**28 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 6 Logic 2 Service 18

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

- 1 **Send** Gmail Tool *Service*
- 2 **Reply** Gmail Tool *Service*
- 3 **Delete** Gmail Tool *Service*
- 4 **Get Many** Gmail Tool *Service*
- 5 **Gemini** Lm Chat Google Gemini *Model*
- 6 **Telegram Trigger** Telegram trigger *Starts it*
- 7 **Gmail Trigger** Gmail trigger *Starts it*
- 8 **Create Event** Google Calendar Tool *Service*
- 9 **Get Many2** Google Calendar Tool *Service*
- 10 **Delete2** Google Calendar Tool *Service*
- 11 **Date & Time** Date Time Tool *Service*
- 12 **Update** Google Calendar Tool *Service*
- 13 **Get Contacts** Google Sheets Tool *Service*
- 14 **Add Contacts** Google Sheets Tool *Service*
- 15 **Simple Memory** Memory Buffer Window *Model*
- 16 **Gemini1** Lm Chat Google Gemini *Model*
- 17 **AI Agent** Agent *Model*
- 18 **If** If *Logic*
- 19 **Basic LLM Chain** Chain Llm *Model*
- 20 **Text Classifier** Text Classifier *Model*
- 21 **Send a text message** Telegram *Service*
- 22 **No Operation, do nothing** No Op *Logic*
- 23 **Send a text message1** Telegram *Service*
- 24 **Client** Gmail *Service*
- 25 **Sponsorship Request** Gmail *Service*
- 26 **Not Business** Gmail *Service*
- 27 **Reply to a message** Gmail *Service*
- 28 **Reply to a message1** Gmail *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 28, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Calendar, Google Sheets, Telegram
- **Model:** Gemini
- **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 Gemini. 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 Gemini. 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 28 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 28 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-ai-agent-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)[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.

- [**AI-powered RAG Q&A chatbot with OpenAI and Google Sheets** 28 steps · calls a model · Google Calendar, Google Drive](https://millionrounds.com/workflow/ai-powered-rag-q-and-a-chatbot-with-openai-and-google-sheets)
- [**Build a chatbot, voice and phone agent with Voiceflow** 28 steps · calls a model · Google Calendar, Google Drive](https://millionrounds.com/workflow/build-a-chatbot-voice-and-phone-agent-with-voiceflow)
- [**Automate event registration and reminder emails with Forms** 28 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-event-registration-and-reminder-emails-with-forms)
- [**AI-powered bug reporting & tracking** 29 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/ai-powered-bug-reporting-and-tracking)
- [**Build an AI powered phone agent with Retell** 29 steps · calls a model · Google Calendar, Google Drive](https://millionrounds.com/workflow/build-an-ai-powered-phone-agent-with-retell)
- [**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)
