# With Gemini and OpenAI: n8n workflow template

> Started by a clock, and works across Gmail, Google Drive and Telegram. It hands the judgement calls to Gemini and OpenAI.

Source: https://millionrounds.com/workflow/with-gemini-and-openai (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)

# With Gemini and OpenAI

Started by a clock, and works across Gmail, Google Drive and Telegram. It hands the judgement calls to Gemini and OpenAI. 31 steps: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini, OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fwith-gemini-and-openai)

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

**0** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 5 Logic 16 Service 8

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

- 1 **gpt-4o-mini** Lm Chat Open Ai *Model*
- 2 **When Executed by Another Workflow** Execute Workflow trigger *Starts it*
- 3 **Workflow Tool** Tool Workflow *Model*
- 4 **Schedule Trigger** Schedule trigger *Starts it*
- 5 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 6 **n8n Creators Stats Agent** Agent *Model*
- 7 **Global Variables** Set *Logic*
- 8 **Create Top 10 Workflows List** Chain Llm *Model*
- 9 **creator-summary** Convert To File *Service*
- 10 **Google Drive** Google Drive *Service*
- 11 **Convert Markdown to HTML** Markdown *Logic*
- 12 **stats_aggregate_creators** Http Request *Service*
- 13 **stats_aggregate_workflows** Http Request *Service*
- 14 **Convert Top 10 Markdown to HTML** Markdown *Logic*
- 15 **Telegram Top 10 Workflows List** Telegram *Service*
- 16 **Save creator-summary.md** Read Write File *Service*
- 17 **Gmail Creators & Workflows Report** Gmail *Service*
- 18 **Parse Creators Data** Set *Logic*
- 19 **Parse Workflow Data** Set *Logic*
- 20 **Gmail Top 10 Workflows List** Gmail *Service*
- 21 **Split Out Creators** Split Out *Logic*
- 22 **Split Out Workflows** Split Out *Logic*
- 23 **Sort By Top Weekly Creator Inserts** Sort *Logic*
- 24 **Sort By Top Weekly Workflow Inserts** Sort *Logic*
- 25 **Take Top 10 Creators** Limit *Logic*
- 26 **Take Top 50 Workflows** Limit *Logic*
- 27 **Creators Data** Set *Logic*
- 28 **Workflows Data** Set *Logic*
- 29 **Merge Creators & Workflows** Merge *Logic*
- 30 **Aggregate** Aggregate *Logic*
- 31 **Workflow Response** Set *Logic*

## How it's built

- **Starts on:** A clock
- **Steps:** 31
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Drive, Telegram
- **Model:** Gemini, OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Drive and Telegram 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 a clock.

Does it use AI?

Yes. It calls Gemini and OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 31 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 31 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%2Fwith-gemini-and-openai)
- **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 Drive](https://millionrounds.com/workflows?service=Google+Drive#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.

- [**Company knowledge base agent (RAG) with OpenAI** 31 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/company-knowledge-base-agent-rag-with-openai)
- [**Create a session-based Telegram chatbot with OpenAI** 31 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/create-a-session-based-telegram-chatbot-with-openai)
- [**Intake Architect - Multi-Channel Professional Services Client** 31 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/intake-architect-multi-channel-professional-services-client)
- [**Record Property Maintenance Issues with Slack** 31 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/record-property-maintenance-issues-with-slack)
- [**Finance transaction auto record into Notion with OpenAI** 30 steps · calls a model · Notion, Telegram](https://millionrounds.com/workflow/finance-transaction-auto-record-into-notion-with-openai)
- [**Manage safety inspections and corrective actions with DeepSeek** 32 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-safety-inspections-and-corrective-actions-with-deepse)
