# Automated customer support system with Gmail: n8n workflow

> Started by someone submitting a form, and works across Gmail, Google Sheets, Qdrant and Telegram.

Source: https://millionrounds.com/workflow/automated-customer-support-system-with-gmail (Millionrounds; every figure on the page links to its filing or article)

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

# Automated customer support system with Gmail

Started by someone submitting a form, and works across Gmail, Google Sheets, Qdrant and Telegram. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 31 steps, 2 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%2Fautomated-customer-support-system-with-gmail)

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

**2** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 2 Model 13 Logic 9 Service 7

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

- 1 **Gmail Trigger1** Gmail trigger *Starts it*
- 2 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 3 **Embeddings Mistral Cloud** Embeddings Mistral Cloud *Model*
- 4 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 5 **Embeddings Mistral Cloud1** Embeddings Mistral Cloud *Model*
- 6 **Structured Output Parser1** Output Parser Structured *Model*
- 7 **On form submission** Form trigger *Starts it*
- 8 **Recursive Character Text Splitter** Text Splitter Recursive Character Text Splitter *Model*
- 9 **Embeddings Mistral Cloud2** Embeddings Mistral Cloud *Model*
- 10 **Extract Email Data** Set *Logic*
- 11 **AI Analysis Agent** Agent *Model*
- 12 **Qdrant Vector Store** Vector Store Qdrant *Model*
- 13 **AI Analysis Agent1** Agent *Model*
- 14 **Qdrant Vector Store1** Vector Store Qdrant *Model*
- 15 **create collection1** Http Request *Service*
- 16 **Qdrant Vector Store2** Vector Store Qdrant *Model*
- 17 **Default Data Loader1** Document Default Data Loader *Model*
- 18 **Filter New Customer Emails** If *Logic*
- 19 **Process AI Analysis** Set *Logic*
- 20 **Process AI Analysis1** Set *Logic*
- 21 **Edit Fields1** Set *Logic*
- 22 **Get Thread History** Gmail *Service*
- 23 **Edit Fields** Set *Logic*
- 24 **Process Thread History** Code *Logic*
- 25 **Needs Escalation?** If *Logic*
- 26 **Aggregate** Aggregate *Logic*
- 27 **Needs Human Review Label** Gmail *Service*
- 28 **Send Automated Reply** Gmail *Service*
- 29 **Auto Resolved Label** Gmail *Service*
- 30 **Log Ticket to Google Sheets** Google Sheets *Service*
- 31 **Send Status Update** Telegram *Service*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 31, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets, Qdrant, Telegram
- **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, Qdrant and Telegram accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

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 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%2Fautomated-customer-support-system-with-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)[Qdrant](https://millionrounds.com/workflows?service=Qdrant#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also customer support, with the same services where possible, closest in size first.

- [**Answer internal policy questions from Google Drive with OpenAI** 31 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/answer-internal-policy-questions-from-google-drive-with-open)
- [**Triage and draft support replies with Anthropic** 31 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/triage-and-draft-support-replies-with-anthropic)
- [**Advanced Telegram bot, ticketing system, liveChat, user** 31 steps · Redis, Telegram](https://millionrounds.com/workflow/advanced-telegram-bot-ticketing-system-livechat-user)
- [**AI-powered WhatsApp support bot with OpenAI and Gmail** 32 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/ai-powered-whatsapp-support-bot-with-openai-and-gmail)
- [**Automate B2B SaaS renewal risk management with CRM** 30 steps · Gmail, HubSpot](https://millionrounds.com/workflow/automate-b2b-saas-renewal-risk-management-with-crm)
- [**Answer onboarding questions in Slack with Anthropic** 33 steps · calls a model · Google Sheets, Pinecone](https://millionrounds.com/workflow/answer-onboarding-questions-in-slack-with-anthropic)
