# AI email auto-responder system- AI RAG agent for email inbox: n8n workflow

> Started by an arriving email, and works across Gmail, Google Docs, Google Drive, Notion and one other.

Source: https://millionrounds.com/workflow/ai-email-auto-responder-system-ai-rag-agent-for-email-inbox (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)

# AI email auto-responder system- AI RAG agent for email inbox

Started by an arriving email, and works across Gmail, Google Docs, Google Drive, Notion and one other. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 27 steps, 1 branch: 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%2Fai-email-auto-responder-system-ai-rag-agent-for-email-inbox)

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

**1** Branch: places the flow splits

**0** Loops or waits

**5** Services it connects to

## The flow

Starts it 3 Model 16 Logic 4 Service 4

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

- 1 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 2 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 3 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 4 **Get Brand brief** Tool Workflow *Model*
- 5 **Gmail Trigger** Gmail trigger *Starts it*
- 6 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 7 **Simple Memory** Memory Buffer Window *Model*
- 8 **OpenAI Chat Model3** Lm Chat Open Ai *Model*
- 9 **Google Drive Trigger** Google Drive trigger *Starts it*
- 10 **Recursive Character Text Splitter** Text Splitter Recursive Character Text Splitter *Model*
- 11 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 12 **When Executed by Another Workflow** Execute Workflow trigger *Starts it*
- 13 **Google Docs** Google Docs *Service*
- 14 **Search Information** Agent *Model*
- 15 **Pinecone Vector Store1** Vector Store Pinecone *Model*
- 16 **Answer questions with a vector store** Tool Vector Store *Model*
- 17 **Set Data** Set *Logic*
- 18 **Check if Question** Chain Llm *Model*
- 19 **Response writer** Agent *Model*
- 20 **Google Drive** Google Drive *Service*
- 21 **Default Data Loader** Document Default Data Loader *Model*
- 22 **Pinecone Vector Store** Vector Store Pinecone *Model*
- 23 **Notion** Notion *Service*
- 24 **If** If *Logic*
- 25 **Gmail** Gmail *Service*
- 26 **Aggregate** Aggregate *Logic*
- 27 **Edit Fields** Set *Logic*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 27, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Docs, Google Drive, Notion, Pinecone
- **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 Docs, Google Drive, Notion and Pinecone 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 27 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 27 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%2Fai-email-auto-responder-system-ai-rag-agent-for-email-inbox)
- **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 Docs](https://millionrounds.com/workflows?service=Google+Docs#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Notion](https://millionrounds.com/workflows?service=Notion#library)[Pinecone](https://millionrounds.com/workflows?service=Pinecone#library)

## Workflows like it

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

- [**Build a RAG knowledge base from PDFs with Gemini and Supabase** 27 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/build-a-rag-knowledge-base-from-pdfs-with-gemini-and-supabas)
- [**Generate AI YouTube shorts with Claude and Gemini** 27 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/generate-ai-youtube-shorts-with-claude-and-gemini)
- [**Personal finance tracker with Telegram Bot and Gemini** 27 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/personal-finance-tracker-with-telegram-bot-and-gemini)
- [**Screen LinkedIn jobs and send tailored applications with Apify** 27 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/screen-linkedin-jobs-and-send-tailored-applications-with-api)
- [**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)
- [**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)
