# Adaptive email auto-responder with OpenAI and Gmail: n8n workflow

> Started by an arriving email, and works across Gmail, Google Sheets and Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from...

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

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

# Adaptive email auto-responder with OpenAI and Gmail

Started by an arriving email, and works across Gmail, Google Sheets and Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 29 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadaptive-email-auto-responder-with-openai-and-gmail)

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

**4** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 13 Logic 8 Service 6

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

- 1 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 4 **Structured Output Parser** Output Parser Structured *Model*
- 5 **Google Sheets Trigger** Google Sheets trigger *Starts it*
- 6 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 7 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 8 **Recursive Character Text Splitter** Text Splitter Recursive Character Text Splitter *Model*
- 9 **Gmail Trigger1** Gmail trigger *Starts it*
- 10 **Supabase Vector Store** Vector Store Supabase *Model*
- 11 **AI Agent** Agent *Model*
- 12 **Auto-fixing Output Parser** Output Parser Autofixing *Model*
- 13 **If1** If *Logic*
- 14 **Information Extractor** Information Extractor *Model*
- 15 **Supabase Vector Store1** Vector Store Supabase *Model*
- 16 **Default Data Loader** Document Default Data Loader *Model*
- 17 **If2** If *Logic*
- 18 **If** If *Logic*
- 19 **Get Dynamic Prompt1** Google Sheets *Service*
- 20 **Markdown1** Markdown *Logic*
- 21 **Switch** Switch *Logic*
- 22 **Get Dynamic Prompt** Google Sheets *Service*
- 23 **Markdown** Markdown *Logic*
- 24 **Gmail** Gmail *Service*
- 25 **Gmail1** Gmail *Service*
- 26 **Google Sheets1** Google Sheets *Service*
- 27 **Original Reply** Markdown *Logic*
- 28 **Google Sheets** Google Sheets *Service*
- 29 **Edit Fields** Set *Logic*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 29, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets, Supabase vectors
- **Model:** OpenAI
- **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 Sheets and Supabase vectors accounts, and a key for OpenAI. 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 OpenAI. 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 29 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 29 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%2Fadaptive-email-auto-responder-with-openai-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 Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Supabase vectors](https://millionrounds.com/workflows?service=Supabase+vectors#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**Create emotional stories with Gemini and Veo3 JSON** 29 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-emotional-stories-with-gemini-and-veo3-json)
- [**Marketing automation workflow with Google Sheet** 29 steps · Google Sheets](https://millionrounds.com/workflow/marketing-automation-workflow-with-google-sheet)
- [**Advanced usage of Forms with OpenAI and Gmail** 30 steps · calls a model · Gmail, Notion](https://millionrounds.com/workflow/advanced-usage-of-forms-with-openai-and-gmail)
- [**Create consistent AI characters with Google Nano Banana** 28 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-consistent-ai-characters-with-google-nano-banana)
- [**Create sprint goals from Google Sheets with Pega Agile Studio** 30 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/create-sprint-goals-from-google-sheets-with-pega-agile-studi)
- [**Customer service workflow with Gemini and Google Drive** 28 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/work-flow-cskh-with-gemini-and-google-drive)
