# Ensure required data tables exist with Gemini: n8n workflow

> Started by an event in a connected app, and works across n8n data table. It puts Gemini behind a retrieval step, so answers are drawn from documents you...

Source: https://millionrounds.com/workflow/ensure-required-data-tables-exist-with-gemini (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)

# Ensure required data tables exist with Gemini

Started by an event in a connected app, and works across n8n data table. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 15 steps, 1 branch, 1 loop or waits: a working afternoon to understand properly.

Medium Calls a model: Gemini Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fensure-required-data-tables-exist-with-gemini)

**15 steps** Medium: a working afternoon

**1** Branch: places the flow splits

**1** Loop or waits

**1** Service it connects to

## The flow

Starts it 1 Model 3 Logic 2 Service 9

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

- 1 **Start** Execute Workflow trigger *Starts it*
- 2 **Simple Memory** Memory Buffer Window *Model*
- 3 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 4 **c1Table** Data Table Tool *Service*
- 5 **c2Table** Data Table Tool *Service*
- 6 **c3Table** Data Table Tool *Service*
- 7 **c4Table** Data Table Tool *Service*
- 8 **c5Table** Data Table Tool *Service*
- 9 **c6Table** Data Table Tool *Service*
- 10 **c7Table** Data Table Tool *Service*
- 11 **c8Table** Data Table Tool *Service*
- 12 **List data tables** Data Table *Service*
- 13 **AI Agent** Agent *Model*
- 14 **Loop Over Items** Split In Batches *Logic*
- 15 **MatchingTableFound** If *Logic*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 15, with 1 branch, 1 loop or waits
- **Size:** Medium: a working afternoon
- **Connects to:** n8n data table
- **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, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

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?

Plan an afternoon. 15 steps is enough that you should read each one before running it.

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 15 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%2Fensure-required-data-tables-exist-with-gemini)
- **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.

[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

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

- [**Gate AI answers against source docs with Groq** 14 steps · calls a model · n8n data table](https://millionrounds.com/workflow/gate-ai-answers-against-source-docs-with-groq)
- [**Generate and manage short links with OpenAI** 14 steps · calls a model · n8n data table](https://millionrounds.com/workflow/generate-and-manage-short-links-with-openai)
- [**Generate personalized email icebreakers with OpenAI** 14 steps · calls a model · n8n data table](https://millionrounds.com/workflow/generate-personalized-email-icebreakers-with-openai)
- [**Automate YouTube Shorts Uploads with OpenAI and Google Drive** 13 steps · calls a model · Google Drive, YouTube](https://millionrounds.com/workflow/automate-youtube-shorts-uploads-with-openai-and-google-drive)
- [**Generate natural health remedies guides with OpenAI** 13 steps · calls a model · Google Docs, n8n data table](https://millionrounds.com/workflow/generate-natural-health-remedies-guides-with-openai)
- [**Screen vendor bank change requests with Groq and Google DNS** 13 steps · calls a model · n8n data table](https://millionrounds.com/workflow/screen-vendor-bank-change-requests-with-groq-and-google-dns)
